/// <summary> /// Sets the selection to the specified item. /// </summary> /// <param name="item">Item to set selection to.</param> public void SetSelection(GraphicalDependenciesItem item) { ClearSelection(); selectedDItems.Add(item); item.IsSelected = true; System.Collections.ObjectModel.Collection <object> col = new System.Collections.ObjectModel.Collection <object>(); col.Add(item.SelectedData); this.SelectedItems = col; }
/// <summary> /// Sets the selection to the specified item. /// </summary> /// <param name="item">Item to set selection to.</param> public void SetSelection(GraphicalDependenciesItem item) { ClearSelection(); selectedDItems.Add(item); item.IsSelected = true; System.Collections.ObjectModel.Collection<object> col = new System.Collections.ObjectModel.Collection<object>(); col.Add(item.SelectedData); this.SelectedItems = col; }
private static void IsSelectedPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args) { GraphicalDependenciesItem item = obj as GraphicalDependenciesItem; if (item.DataContext != null) { if (item != null) { } } }