private void MenuItem_Click_addTag(object sender, RoutedEventArgs e) { _TagSelect = treeView1.SelectedItem as Tag; string name = getTag(_TagSelect); Tag_data select_tag = new Tag_data() { name = name, isvisibli = Visibility.Collapsed }; _listviewItems.Add(select_tag); }
private void listView1_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (isselect) { if (_listView1Select != null) { _listView1Select.isvisibli = Visibility.Collapsed; } _listView1Select = this.listView1.SelectedItem as Tag_data; _listView1Select.isvisibli = Visibility.Visible; } }