protected override void OnSelectionChanged(SelectionChangedEventArgs e) { base.OnSelectionChanged(e); if (CommandView.current == null) { return; } selected_server_info = this.SelectedItem as ServerInfoTextBlock; if (selected_server_info == null) { CommandView.current.Visibility = Visibility.Hidden; return; } else { CommandView.current.Visibility = Visibility.Visible; } CommandView.refresh(selected_server_info); }
protected override void OnSelectionChanged(SelectionChangedEventArgs e) { base.OnSelectionChanged(e); selected_serverinfo_textblock = this.SelectedItem as ServerInfoTextBlock; if (selected_serverinfo_textblock == null) { if (CommandView.current != null) { CommandView.current.Visibility = Visibility.Hidden; } return; } if (CommandView.current != null) { CommandView.current.Visibility = Visibility.Visible; } CommandView.refresh(selected_serverinfo_textblock); LinuxTreeViewItem.Refresh(); }