ComboBox, ListBox, Flipview, itemscontr
Introduced
Re-imagine the Windows 8 Store Apps Collection Control
ComboBox-Dropdown box
ListBox-list box
Flipview-Slide View Control
ItemsControl Itemspresenter-itemspresenter is used to render ItemsControl Items
Example
1, ComboBox's Demo
Comboboxdemo.xaml
<page x:class= "XamlDemo.Controls.ComboBoxDemo" xmlns= "Http://schemas.microsoft.com/winfx/2006/xaml/presentati On "xmlns:x=" Http://schemas.microsoft.com/winfx/2006/xaml "xmlns:local=" using:XamlDemo.Controls "xmlns:d=" http ://schemas.microsoft.com/expression/blend/2008 "xmlns:mc=" http://schemas.openxmlformats.org/ markup-compatibility/2006 "mc:ignorable=" D "> <grid background=" Transparent "> <st Ackpanel margin= "0 0 0" > <!--ComboBox-dropdown box--> <!-- XAML method adds data to ComboBox--> <combobox x:name= "ComboBox" width= "5" margin= "left" &
Gt
<comboboxitem content= "ComboBoxItem1"/> <comboboxitem content= "ComboBoxItem2"/>
<comboboxitem content= "ComboBoxItem3"/> </ComboBox> <!-- The background binding method isComboBox Add Data DisplayMemberPath-Specifies the name of the field that needs to be displayed in the data source maxdropdownheight-for specifying the open drop-down box Maximum height--> <combobox x:name= "comboboxwithbinding" displaymemberpath= "Name" Maxdropdownheig ht= "Width=" margin= "5" horizontalalignment= "left"/> <!--to set the layout and data for each item of ComboBox through a template- -> <combobox itemssource= "{Binding ItemsSource, elementname=comboboxwithbinding}" maxdropdownheight= "100
"Width=" margin= "5" horizontalalignment= "left" > <ComboBox.ItemTemplate>
<DataTemplate> <stackpanel orientation= "Horizontal" > <textblock text= ' {Binding Name} '/> <textblock text= ' {Binding age} ' margin=
"5 0 0 0"/> </StackPanel> </DataTemplate> </combobox.itemtemplate> </ComboBox> </StackPanel> </Grid> </Page>