Exemplo n.º 1
0
        private void ButtonNewGroup_Click(object sender, RoutedEventArgs e)
        {
            ExpanderItem window = new ExpanderItem();

            if (window.ShowDialog() == true)
            {
                ExpanderData data = window.ExpanderData;
                expanderList.Add(data);
                ListViewGroups.ItemsSource = null;
                ListViewGroups.ItemsSource = expanderList;
            }
        }
Exemplo n.º 2
0
 private void ButtonUpdateGroup_Click(object sender, RoutedEventArgs e)
 {
     if ((ListViewGroups.SelectedItem != null) && (ListViewGroups.SelectedItem is ExpanderData))
     {
         ExpanderData data = ListViewGroups.SelectedItem as ExpanderData;
         if (data != null)
         {
             ExpanderItem window = new ExpanderItem(data);
             if (window.ShowDialog() == true)
             {
                 ExpanderData newdata = window.ExpanderData;
                 expanderList.Remove(data);
                 expanderList.Add(newdata);
                 ListViewGroups.ItemsSource = null;
                 ListViewGroups.ItemsSource = expanderList;
             }
         }
     }
 }