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