private static void UpdateAnnotationPosition(CartesianChartAnnotation annotation, DataTuple dataTuple) { if (annotation is CartesianGridLineAnnotation) { UpdateGridLineAnnotation((CartesianGridLineAnnotation)annotation, dataTuple); } }
private static void UnregisterFromEvents(CartesianChartAnnotation annotation) { annotation.MouseEnter -= Annotation_MouseEnter; annotation.MouseLeftButtonDown -= Annotation_MouseLeftButtonDown; annotation.MouseMove -= Annotation_MouseMove; annotation.MouseLeftButtonUp -= Annotation_MouseLeftButtonUp; annotation.MouseLeave -= Annotation_MouseLeave; annotation.Unloaded -= Annotation_Unloaded; }
private static void ManageEventsRegistering(bool isDraggingEnabled, CartesianChartAnnotation annotation) { UnregisterFromEvents(annotation); if (isDraggingEnabled) { annotation.MouseEnter += Annotation_MouseEnter; annotation.MouseLeftButtonDown += Annotation_MouseLeftButtonDown; annotation.MouseMove += Annotation_MouseMove; annotation.MouseLeftButtonUp += Annotation_MouseLeftButtonUp; annotation.MouseLeave += Annotation_MouseLeave; annotation.Unloaded += Annotation_Unloaded; } }