* [NUI] fix relative layout to fill regardless of children size.
* [NUI] add ImageUrl property on DefaultGridItem.
* [NUI] update imageUrl to resourceUrl
* [NUI] fix DefaultGridItem image to fill available area.
* [NUI][NUITizenGallery] add Animal ListView and GridView examples
* [NUI] Remove unused reference
* [NUI] Add ActionsProperty to AlertDialog to support xaml
To support Actions property of AlertDialog in xaml, the bindable
property ActionsProperty has been added to AlertDialog.
The AlertDialog example with xaml has been added to NUITizenGallery.
* [NUI] Version Update 22206
Co-authored-by: EverLEEst(SangHyeon Lee) <sh10233.lee@samsung.com>
Co-authored-by: Xianbing Teng <xb.teng@samsung.com>
Co-authored-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
# Auto-generated from csapi-tizenfx.spec.in by makespec.sh
%define TIZEN_NET_API_VERSION 11
-%define TIZEN_NET_RPM_VERSION 11.0.0.999+nui22205
+%define TIZEN_NET_RPM_VERSION 11.0.0.999+nui22206
%define TIZEN_NET_NUGET_VERSION 11.0.0.99999
%define DOTNET_ASSEMBLY_PATH /usr/share/dotnet.tizen/framework
NUGET_VERSION=11.0.0.99999
# RPM Version Suffix
-RPM_VERSION_SUFFIX=nui22205
+RPM_VERSION_SUFFIX=nui22206
{
get
{
+ return GetValue(ActionsProperty) as IEnumerable<View>;
+ }
+ set
+ {
+ SetValue(ActionsProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private IEnumerable<View> InternalActions
+ {
+ get
+ {
return actionContentViews;
}
set
using System.ComponentModel;
+using System.Collections.Generic;
using Tizen.NUI.BaseComponents;
using Tizen.NUI.Binding;
});
/// <summary>
+ /// ActionsProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty ActionsProperty = BindableProperty.Create(nameof(Actions), typeof(IEnumerable<View>), typeof(AlertDialog), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (AlertDialog)bindable;
+ if (newValue != null)
+ {
+ instance.InternalActions = newValue as IEnumerable<View>;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (AlertDialog)bindable;
+ return instance.InternalActions;
+ });
+
+ /// <summary>
/// ActionContentProperty
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
}
}
- /* open when ImageView using Uri not string
- /// <summary>
- /// Image image's resource url in DefaultGridItem.
- /// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public string ImageUrl
- {
- get
- {
- return Image.ResourceUrl;
- }
- set
- {
- Image.ResourceUrl = value;
- }
- }
- */
+ /// <summary>
+ /// Image resource url in DefaultGridItem.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public string ResourceUrl
+ {
+ get => GetValue(ResourceUrlProperty) as string;
+ set
+ {
+ SetValue(ResourceUrlProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ internal string InternalResourceUrl
+ {
+ get
+ {
+ return Image.ResourceUrl;
+ }
+ set
+ {
+ Image.ResourceUrl = value;
+ }
+ }
+
/// <summary>
/// DefaultGridItem's text part.
RelativeLayout.SetRightTarget(itemImage, this);
RelativeLayout.SetRightRelativeOffset(itemImage, 1.0F);
RelativeLayout.SetHorizontalAlignment(itemImage, RelativeLayout.Alignment.Center);
+ RelativeLayout.SetFillHorizontal(itemImage, true);
+ RelativeLayout.SetFillVertical(itemImage, true);
if (itemLabel != null)
{
return instance.InternalText;
});
+
+ /// <summary>
+ /// ResourceUrlProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty ResourceUrlProperty = BindableProperty.Create(nameof(ResourceUrl), typeof(string), typeof(DefaultGridItem), default(string), propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (DefaultGridItem)bindable;
+ if (newValue != null)
+ {
+ instance.InternalResourceUrl = newValue as string;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (DefaultGridItem)bindable;
+ return instance.InternalResourceUrl;
+ });
+
/// <summary>
/// LabelOrientationTypeProperty
/// </summary>
</PropertyGroup>
<ItemGroup>
- <TizenPreloadFile Include="Tizen.NUI.preload"
- Sequence="30" />
+ <TizenPreloadFile Include="Tizen.NUI.preload" Sequence="30" />
</ItemGroup>
<ItemGroup>
- <PackageReference Include="Microsoft.CSharp"
- Version="4.3.0" />
- <PackageReference Include="System.Reflection"
- Version="4.3.0" />
- <PackageReference Include="System.Reflection.TypeExtensions"
- Version="4.3.0" />
- <PackageReference Include="Microsoft.Extensions.DependencyInjection"
- Version="1.1.0" />
+ <PackageReference Include="Microsoft.CSharp" Version="4.3.0" />
+ <PackageReference Include="System.Reflection.TypeExtensions" Version="4.3.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Tizen.Applications.Common\Tizen.Applications.Common.csproj" />
<ProjectReference Include="..\Tizen.Applications.ThemeManager\Tizen.Applications.ThemeManager.csproj" />
<ProjectReference Include="..\Tizen.Tracer\Tizen.Tracer.csproj" />
</ItemGroup>
- <Target Name="ChangeAliasesOfStrongNameAssemblies"
- BeforeTargets="FindReferenceAssembliesForReferences;ResolveReferences">
+ <Target Name="ChangeAliasesOfStrongNameAssemblies" BeforeTargets="FindReferenceAssembliesForReferences;ResolveReferences">
<ItemGroup>
<ReferencePath Condition="'%(FileName)' == 'Tizen.System.SystemSettings'">
<Aliases>TizenSystemSettings</Aliases>
Geometry viewGeometry = new Geometry(startPosition + ((endPosition - startPosition - viewSize) * alignment), viewSize);
Geometry spaceGeometry = new Geometry(startPosition, Math.Abs(endPosition - startPosition));
- if (fill && spaceGeometry.Size > viewGeometry.Size)
+ if (fill)
{
viewGeometry = spaceGeometry;
}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<DialogPage x:Class="NUITizenGallery.AlertDialogTestDialogPage"
+ xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ xmlns:sys="clr-namespace:System.Collections.Generic;assembly=netstandard">
+
+ <!-- Content is main placeholder of DialogPage. Add your dialog into this view. -->
+ <DialogPage.Content>
+ <AlertDialog x:Name="alertDialog" Title="Title" Message="Message">
+ <AlertDialog.Actions>
+ <sys:List x:TypeArguments="View">
+ <Button x:Name="cancelButton" Text="Cancel"/>
+ <Button x:Name="okButton" Text="OK"/>
+ </sys:List>
+ </AlertDialog.Actions>
+ </AlertDialog>
+ </DialogPage.Content>
+
+</DialogPage>
--- /dev/null
+/*
+ * Copyright(c) 2022 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+//using Tizen.NUI;
+//using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUITizenGallery
+{
+ public partial class AlertDialogTestDialogPage : DialogPage
+ {
+ public AlertDialogTestDialogPage()
+ {
+ InitializeComponent();
+
+ cancelButton.Clicked += CancelButtonClicked;
+ okButton.Clicked += OkButtonClicked;
+ }
+
+ private void CancelButtonClicked(object sender, ClickedEventArgs args)
+ {
+ Navigator?.Pop();
+ }
+
+ private void OkButtonClicked(object sender, ClickedEventArgs args)
+ {
+ Navigator?.Pop();
+ }
+ }
+}
<LinearLayout LinearOrientation="Vertical" CellPadding="0,20"/>
</View.Layout>
+ <Button x:Name="buttonWithXaml"
+ Text="Show AlertDialog with xaml"
+ WidthSpecification="{Static LayoutParamPolicies.MatchParent}" />
+
<Button x:Name="buttonOneAction"
Text="Show AlertDialog with one button"
WidthSpecification="{Static LayoutParamPolicies.MatchParent}" />
/*
- * Copyright(c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2022 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
{
InitializeComponent();
+ buttonWithXaml.Clicked += ButtonWithXamlClicked;
buttonOneAction.Clicked += ButtonOneActionClicked;
buttonTwoActions.Clicked += ButtonTwoActionsClicked;
buttonNoTitle.Clicked += ButtonNoTitleClicked;
private int count;
+ private void ButtonWithXamlClicked(object sender, ClickedEventArgs args)
+ {
+ NUIApplication.GetDefaultWindow().GetDefaultNavigator().Push(new AlertDialogTestDialogPage());
+ }
+
private void ButtonOneActionClicked(object sender, ClickedEventArgs args)
{
var button = new Button()
--- /dev/null
+/*
+ * Copyright(c) 2022 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+
+namespace NUITizenGallery
+{
+ internal class AnimalGrid : IExample
+ {
+ private Window window;
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ window = NUIApplication.GetDefaultWindow();
+ window.GetDefaultNavigator().Push(new AnimalGridPage());
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ window.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2022 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using System.ComponentModel;
+using Tizen.NUI;
+using Tizen.NUI.Binding;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+using Tizen.NUI.Components.Extension;
+
+namespace NUITizenGallery
+{
+ public partial class AnimalGridPage : ContentPage
+ {
+ public AnimalGridPage()
+ {
+ InitializeComponent();
+ BindingContext = new Animals();
+ }
+
+ protected override void Dispose(DisposeTypes type)
+ {
+ if (Disposed)
+ {
+ return;
+ }
+
+ if (type == DisposeTypes.Explicit)
+ {
+ RemoveAllChildren(true);
+ }
+
+ base.Dispose(type);
+ }
+
+ private void RemoveAllChildren(bool dispose = false)
+ {
+ RecursiveRemoveChildren(this, dispose);
+ }
+
+ private void RecursiveRemoveChildren(View parent, bool dispose)
+ {
+ if (parent == null)
+ {
+ return;
+ }
+
+ int maxChild = (int)parent.ChildCount;
+ for (int i = maxChild - 1; i >= 0; --i)
+ {
+ View child = parent.GetChildAt((uint)i);
+ if (child == null)
+ {
+ continue;
+ }
+
+ RecursiveRemoveChildren(child, dispose);
+ parent.Remove(child);
+ if (dispose)
+ {
+ child.Dispose();
+ }
+ }
+ }
+ }
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<ContentPage x:Class="NUITizenGallery.AnimalGridPage"
+ xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ WidthSpecification="{Static LayoutParamPolicies.MatchParent}"
+ HeightSpecification="{Static LayoutParamPolicies.MatchParent}" >
+
+ <!-- AppBar is top-side bar with navigation content, title, and action. If you not set any contents, back button is automatically added. -->
+ <ContentPage.AppBar>
+ <AppBar x:Name="appBar" Title="AnimalGridPage"/>
+ </ContentPage.AppBar>
+
+ <!-- Content is main placeholder of ContentPage. Add your content into this view. -->
+ <ContentPage.Content>
+ <View x:Name="ContentView"
+ WidthSpecification="{Static LayoutParamPolicies.MatchParent}"
+ HeightSpecification="{Static LayoutParamPolicies.MatchParent}">
+
+ <View.Layout>
+ <LinearLayout LinearOrientation="Vertical" LinearAlignment="Top" CellPadding="10,10" />
+ </View.Layout>
+
+ <CollectionView x:Name="ColView"
+ WidthSpecification="{Static LayoutParamPolicies.MatchParent}"
+ HeightSpecification="{Static LayoutParamPolicies.MatchParent}"
+ ScrollingDirection="Vertical"
+ ItemsSource="{Binding Source}"
+ HideScrollbar="true"
+ SelectionMode="None">
+
+ <CollectionView.ItemsLayouter>
+ <GridLayouter />
+ </CollectionView.ItemsLayouter>
+ <CollectionView.ItemTemplate>
+ <DataTemplate>
+ <DefaultGridItem
+ WidthSpecification="230"
+ HeightSpecification="200"
+ Text="{Binding Path=Name}"
+ ResourceUrl="{Binding Path=ImagePath}">
+ <DefaultGridItem.Badge>
+ <CheckBox />
+ </DefaultGridItem.Badge>
+ </DefaultGridItem>
+ </DataTemplate>
+ </CollectionView.ItemTemplate>
+
+
+ </CollectionView>
+ </View>
+ </ContentPage.Content>
+</ContentPage>
--- /dev/null
+/*
+ * Copyright(c) 2022 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+
+namespace NUITizenGallery
+{
+ internal class AnimalList : IExample
+ {
+ private Window window;
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ window = NUIApplication.GetDefaultWindow();
+ window.GetDefaultNavigator().Push(new AnimalListPage());
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ window.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2022 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using System.ComponentModel;
+using Tizen.NUI;
+using Tizen.NUI.Binding;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+using Tizen.NUI.Components.Extension;
+
+namespace NUITizenGallery
+{
+ public partial class AnimalListPage : ContentPage
+ {
+ public AnimalListPage()
+ {
+ InitializeComponent();
+ BindingContext = new Animals();
+ }
+
+ protected override void Dispose(DisposeTypes type)
+ {
+ if (Disposed)
+ {
+ return;
+ }
+
+ if (type == DisposeTypes.Explicit)
+ {
+ RemoveAllChildren(true);
+ }
+
+ base.Dispose(type);
+ }
+
+ private void RemoveAllChildren(bool dispose = false)
+ {
+ RecursiveRemoveChildren(this, dispose);
+ }
+
+ private void RecursiveRemoveChildren(View parent, bool dispose)
+ {
+ if (parent == null)
+ {
+ return;
+ }
+
+ int maxChild = (int)parent.ChildCount;
+ for (int i = maxChild - 1; i >= 0; --i)
+ {
+ View child = parent.GetChildAt((uint)i);
+ if (child == null)
+ {
+ continue;
+ }
+
+ RecursiveRemoveChildren(child, dispose);
+ parent.Remove(child);
+ if (dispose)
+ {
+ child.Dispose();
+ }
+ }
+ }
+ }
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<ContentPage x:Class="NUITizenGallery.AnimalListPage"
+ xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ WidthSpecification="{Static LayoutParamPolicies.MatchParent}"
+ HeightSpecification="{Static LayoutParamPolicies.MatchParent}" >
+
+ <!-- AppBar is top-side bar with navigation content, title, and action. If you not set any contents, back button is automatically added. -->
+ <ContentPage.AppBar>
+ <AppBar x:Name="appBar" Title="AnimalListPage"/>
+ </ContentPage.AppBar>
+
+ <!-- Content is main placeholder of ContentPage. Add your content into this view. -->
+ <ContentPage.Content>
+ <View x:Name="ContentView"
+ WidthSpecification="{Static LayoutParamPolicies.MatchParent}"
+ HeightSpecification="{Static LayoutParamPolicies.MatchParent}">
+
+ <View.Layout>
+ <LinearLayout LinearOrientation="Vertical" LinearAlignment="Top" CellPadding="10,10" />
+ </View.Layout>
+
+ <CollectionView x:Name="ColView"
+ WidthSpecification="{Static LayoutParamPolicies.MatchParent}"
+ HeightSpecification="{Static LayoutParamPolicies.MatchParent}"
+ ScrollingDirection="Vertical"
+ ItemsSource="{Binding Source}"
+ HideScrollbar="true"
+ SelectionMode="None">
+
+ <CollectionView.ItemsLayouter>
+ <LinearLayouter />
+ </CollectionView.ItemsLayouter>
+ <CollectionView.ItemTemplate>
+ <DataTemplate>
+ <DefaultLinearItem
+ WidthSpecification="{Static LayoutParamPolicies.MatchParent}"
+ Text="{Binding Path=Name}"
+ SubText="{Binding Path=ScientificName}">
+ <DefaultLinearItem.Icon>
+ <ImageView
+ WidthSpecification="70"
+ HeightSpecification="50"
+ ResourceUrl="{Binding Path=ImagePath}" />
+ </DefaultLinearItem.Icon>
+ <DefaultLinearItem.Extra>
+ <CheckBox />
+ </DefaultLinearItem.Extra>
+ </DefaultLinearItem>
+ </DataTemplate>
+ </CollectionView.ItemTemplate>
+
+
+ </CollectionView>
+ </View>
+ </ContentPage.Content>
+</ContentPage>
--- /dev/null
+/*
+ * Copyright(c) 2022 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using Tizen.NUI;
+using Tizen.NUI.Binding;
+
+public class Animal : INotifyPropertyChanged
+{
+ private string _name;
+ private string _scientificName;
+ private string _imageUrl = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/animals/";
+
+ public event PropertyChangedEventHandler PropertyChanged;
+ private void OnPropertyChanged(string propertyName) { PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); }
+
+
+ public Animal(string name, string scientificName)
+ {
+ _name = name;
+ _scientificName = scientificName;
+ }
+
+ public string Name
+ {
+ get => _name;
+ set
+ {
+ _name = value;
+ OnPropertyChanged("Name");
+ }
+ }
+
+ public string ScientificName
+ {
+ get => _scientificName;
+ set
+ {
+ _scientificName = value;
+ OnPropertyChanged("ScientificName");
+ }
+ }
+
+ public string ImagePath
+ {
+ get
+ {
+ string filename = _name.Replace(" ", "");
+ filename = filename.ToLower() + ".jpg";
+ return _imageUrl + filename;
+ }
+ }
+}
+
+
+public class Animals
+{
+ (string Name,string ScientificName)[] namePool = {
+ ("Bald Eagle", "Haliaeetus leucocephalus"),
+ ("Bear", "Ursidae"),
+ ("Cat", "Felis catus"),
+ ("Chicken", "Gallus gallus domesticus"),
+ ("Cow", "Bos taurus"),
+ ("Deer", "Cervidae"),
+ ("Dog", "Canis lupus familiaris"),
+ ("Duck", "Anatidae"),
+ ("Elephant", "Elephantidae"),
+ ("Emperor Penguin", "Aptenodytes forsteri"),
+ ("Giraffe", "Giraffa"),
+ ("Horse", "Equus ferus"),
+ ("Leopard", "Panthera pardus"),
+ ("Lion", "Panthera leo"),
+ ("Panda", "Ailuropoda melanoleuca"),
+ ("Peacock", "Pavo cristatus"),
+ ("Pig", "Sus scrofa domesticus"),
+ ("Pigeon", "Columba livia"),
+ ("Red Fox", "Vulpes vulpes"),
+ ("Seagull", "Larus canus"),
+ ("Squirrel", "Sciurus vulgaris"),
+ ("Tiger", "Panthera tigris"),
+ ("Wolf", "Canis lupus"),
+ ("Zebra", "Hippotigris"),
+};
+ public ObservableCollection<Animal> Source {get; private set; } = new ObservableCollection<Animal>();
+
+ public Animals()
+ {
+ for (int i = 0; i < namePool.Length; i++)
+ Source.Add(new Animal(namePool[i].Name, namePool[i].ScientificName));
+ }
+}
</ItemGroup>
<PropertyGroup>
- <XamlOptimization>2</XamlOptimization>
+ <XamlOptimization>1</XamlOptimization>
</PropertyGroup>
<ImportGroup>