Search

Thursday, July 31, 2014
0 comments

How to add item into the listBox in windows phone

11:41 PMThursday, July 31, 2014

ListBox is a container in which we can add strings. User can select by clicking. Article contain different topics , these are
 1. Add ListBox Control with items using XAML
 2. Add ListBox Control in code file


There are some basic steps to complete that tasks
Add ListBox control with items using XAML
Step-1 :  Add ListBox control in contentPanel using xaml code , now your code llok like
<ListBox x:Name=" ListBox1" >
 </ListBox>
Step-2 :  Open ListBox properties and select Items(collection) ellipse symbol. After pressing ellipse button , A new window will appear
Open ListBox properties and select Items

Step-3 :  Using Object Collection Editor, add controls to the List Box by selecting controls from Dropdown List.
Object Collection Editor


Step-4  : After adding controls, you can assign content property of them.
Step-5 : Now, Press Ok button after adding items.
Step-6 : Now , Your complete code look like

<ListBox x:Name=" L1" >
                <ListBoxItem Content="Apple"/>
                <ListBoxItem Content="Mango"/>
                <CheckBox Content="Male" IsChecked="True"/>

            </ListBox>

Code Generate the following output

How to add item into the listBox in windows phone
Protected by Copyscape Online Copyright Protection Software

0 comments :

Post a Comment

 
Toggle Footer
Top