Intersoft ClientUI 8 > ClientUI Controls > Control Library > Advanced Input Controls Overview > UXDomainUpDown > How-to: Customize Item Template in UXDomain Up Down |
This example shows how to customize item template in UXDomainUpDown.
C# |
Copy Code
|
---|---|
public class Book { public string Title { get; set; } public string Image { get; set; } } public partial class MainPage : Page { public MyTests() { InitializeComponent(); ObservableCollection<Book> datas = new ObservableCollection<Book>(); datas.Add(new Book() { Title = "American Cooking", Image = "/TestingMySpinner;component/Images/Books/American_cooking_1.jpg" }); datas.Add(new Book() { Title = "Anthologies", Image = "/TestingMySpinner;component/Images/Books/Anthologies_1.jpg" }); datas.Add(new Book() { Title = "Application and Software", Image = "/TestingMySpinner;component/Images/Books/Application_and_Software_1.jpg" }); datas.Add(new Book() { Title = "Baking", Image = "/TestingMySpinner;component/Images/Books/Baking_1.jpg" }); datas.Add(new Book() { Title = "Computer hardware", Image = "/TestingMySpinner;component/Images/Books/Computer_hardware_1.jpg" }); domain.ItemsSource = datas; } } |
XAML |
Copy Code
|
---|---|
<Grid> <Intersoft:UXDomainUpDown x:Name="domain" Height="100" Width="170"> <Intersoft:UXDomainUpDown.ItemTemplate> <DataTemplate> <Grid> <Image Source="{Binding Image}" /> </Grid> </DataTemplate> </Intersoft:UXDomainUpDown.ItemTemplate> </Intersoft:UXDomainUpDown> </Grid> |