packages/Windows API Code Pack 1.1/source/Samples/Shell/StarBackupUsingLibraries/CS/BackupProcessPage.xaml.cs
/// <summary>
/// Goes through the list of folders to backup and adds each folder name (and an empty image control)
/// to the listbox.
/// </summary>
/// <param name="backupList"></param>
Goes through the list of folders to backup and adds each folder name (and an empty image control)
to the listbox.
Goes through the list of folders to backup and adds each folder name ( and an empty image control ) to the listbox .
private void UpdateList(IEnumerable backupList)
        {
            listBox1.Items.Clear();
            foreach (object item in backupList)
            {
                ListBoxItem lbi = new ListBoxItem();
                StackPanel sp = new StackPanel();
                sp.Orientation = Orientation.Horizontal;
                Image img = new Image();
                TextBlock tb = new TextBlock();
                tb.Margin = new Thickness(3);
                tb.Text = item.ToString();
                sp.Children.Add(img);
                sp.Children.Add(tb);
                lbi.Content = sp;
                listBox1.Items.Add(lbi);
            }
        }
private void UpdateList ( IEnumerable backupList ) { listBox1 . Items . Clear ( ) ; foreach ( object item in backupList ) { ListBoxItem lbi = new ListBoxItem ( ) ; StackPanel sp = new StackPanel ( ) ; sp . Orientation = Orientation . Horizontal ; Image img = new Image ( ) ; TextBlock tb = new TextBlock ( ) ; tb . Margin = new Thickness ( 3 ) ; tb . Text = item . ToString ( ) ; sp . Children . Add ( img ) ; sp . Children . Add ( tb ) ; lbi . Content = sp ; listBox1 . Items . Add ( lbi ) ; } }
Goes through the list of folders to backup and adds each folder name (and an empty image control)
to the listbox.
Goes through the list of folders to backup and adds each folder name ( and an empty image control ) to the listbox .
// Start creating our listbox items.. // Create a stackpanel to hold our image and textblock // Set the StackPanel as the content of the listbox Item. //
backupList
IEnumerable
None