private static void OnAxisPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) { CartesianGridLineAnnotation annotation = sender as CartesianGridLineAnnotation; if (annotation.Axis != null) { annotation.model.Axis = annotation.Axis.model; } else { annotation.model.Axis = null; } }
private static void OnValuePropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) { CartesianGridLineAnnotation annotation = sender as CartesianGridLineAnnotation; annotation.model.Value = annotation.Value; if (AutomationPeer.ListenerExists(AutomationEvents.PropertyChanged)) { var peer = FrameworkElementAutomationPeer.FromElement(annotation) as CartesianGridLineAnnotationAutomationPeer; if (peer != null) { peer.RaiseValueChangedAutomationEvent(e.OldValue != null ? e.OldValue.ToString() : string.Empty, e.NewValue != null ? e.NewValue.ToString() : string.Empty); } } }
private static void OnValuePropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) { CartesianGridLineAnnotation annotation = sender as CartesianGridLineAnnotation; annotation.model.Value = annotation.Value; }