private static void OnPositionChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { SelectionLine graph = (SelectionLine)d; graph.UpdateUIRepresentation((Point)e.NewValue); graph.OnPropertyChanged("Position"); graph.CurrentValueChanged(); }
private static void UpdateUIRepresentation(DependencyObject d, DependencyPropertyChangedEventArgs e) { SelectionLine graph = (SelectionLine)d; if ((bool)e.NewValue) { graph.UpdateUIRepresentation(); } else { graph.vertLine.ClearValue(Line.StrokeDashOffsetProperty); graph.horizLine.ClearValue(Line.StrokeDashOffsetProperty); } }