Beispiel #1
0
        private static void OnPositionChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            CursorCoordinateGraph graph = (CursorCoordinateGraph)d;

            graph.UpdateUIRepresentation();
            graph.PositionChanged?.Invoke(graph, EventArgs.Empty);
        }
Beispiel #2
0
        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);
            }
        }