Write the code to populate the controls in Silverlight

Answer

To populate the control in silverlight the requirement is to create the template and their styles. The code mentioned below does it:
The file that is involved in setting up the control is Page.xaml.cs file and then check for the page constructor is being done. The modification will be done in this file as:
public Page()
{
InitializeComponent();
// Write the code for list of items
IEnumerable list = GetItems();
// Write the code for Adding of items
_listBox.ItemsSource = list;
_cmb.ItemsSource = list;
// Set the properties of the font from here
FontFamily[] ff = new FontFamily[]
{
new FontFamily("Default font"),
new FontFamily("Arial"),
};
_cmb1.ItemsSource = ff;
}
This allows the setting up the list and combo box to set up the properties of the silverlight functions by using the ItemsSource property.

All silverlight Questions

Ask your interview questions on silverlight

Write Your comment or Questions if you want the answers on silverlight from silverlight Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---