private static void OnAssociatedPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs args) { PropertyMarker propertyMarker = (PropertyMarker)d; SceneNodeProperty sceneNodeProperty = args.OldValue as SceneNodeProperty; if (sceneNodeProperty != null) { sceneNodeProperty.remove_PropertyChanged(new PropertyChangedEventHandler(propertyMarker.AssociatedProperty_PropertyChanged)); } if (propertyMarker.AssociatedProperty != null) { propertyMarker.SetValue(AutomationElement.IdProperty, (object)(((PropertyEntry)propertyMarker.AssociatedProperty).get_PropertyName() + "_Marker")); propertyMarker.UpdateBrushFromValueSource(); propertyMarker.AssociatedProperty.add_PropertyChanged(new PropertyChangedEventHandler(propertyMarker.AssociatedProperty_PropertyChanged)); } if (!propertyMarker.IsPickingElementProperty) { return; } propertyMarker.elementPropertyPicker.CancelEditing(); propertyMarker.elementPropertyPicker = (PickWhipEngine)null; }
private static void OnDotBrushChanged(DependencyObject d, DependencyPropertyChangedEventArgs args) { PropertyMarker propertyMarker = (PropertyMarker)d; propertyMarker.SetValue(Icon.GreenChromaProperty, (object)propertyMarker.DotBrush); }