Пример #1
0
 private void ListViewItems_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if ((ListViewItems.SelectedItem) == null) return;
     GridAdd.Children.Remove(add);
     add = null;
     GridItemDetails.DataContext = ListViewItems.SelectedItem;
     GridItemDetails.Visibility = Visibility.Visible;
     add = new AddControl(ListViewItems.SelectedItem as Item);
     ButtonAddToDiary.DataContext = add.getCounterClass();
     GridAdd.Children.Add(add);
 }
Пример #2
0
 private void TextBoxSearch_GotFocus(object sender, RoutedEventArgs e)
 {
     (sender as TextBox).SelectAll();
     GridItemDetails.Visibility = Visibility.Collapsed;
     GridAdd.Children.Remove(add);
     add = null;
     GridItemDetails.DataContext = null;
     search = null;
     ListViewItems.ItemsSource = null;
 }