private static void CanExecuteEventHandler_IfHasContent(object sender, CanExecuteRoutedEventArgs e) { ZoomBoxPanel panel = sender as ZoomBoxPanel; e.CanExecute = (panel != null) && (panel.Children.Count > 0); e.Handled = true; }
private static void PropertyChanged_Zoom(DependencyObject d, DependencyPropertyChangedEventArgs e) { ZoomBoxPanel panel = d as ZoomBoxPanel; if (panel != null) { panel.process_PropertyChanged_Zoom(e); } }
private static void PropertyChanged_AMode(DependencyObject d, DependencyPropertyChangedEventArgs e) { ZoomBoxPanel panel = d as ZoomBoxPanel; if (panel != null) { panel.RaiseModeChangeEvent(); } }
public static void ExecutedEventHandler_RotateReverse(object sender, ExecutedRoutedEventArgs e) { ZoomBoxPanel panel = sender as ZoomBoxPanel; if (panel != null) { panel.process_RotateHomeReverse(false); } }
public static void ExecutedEventHandler_IncreaseZoom(object sender, ExecutedRoutedEventArgs e) { ZoomBoxPanel panel = sender as ZoomBoxPanel; if (panel != null) { panel.process_ZoomCommand(true); } }
private static object CoerceMinZoomTick(DependencyObject d, object value) { double num = (double)value; ZoomBoxPanel panel = d as ZoomBoxPanel; if ((panel != null) && (num >= panel.MaxZoomTick)) { panel.MaxZoomTick = num + 1.0; } return(num); }
public static void ExecutedEventHandler_RotateCounterclockwise(object sender, ExecutedRoutedEventArgs e) { ZoomBoxPanel panel = sender as ZoomBoxPanel; double? angle = null; string parameter = e.Parameter as string; if ((parameter != null) && (parameter.Length > 0)) { angle = new double?(double.Parse(parameter)); } if (panel != null) { panel.process_RotateCommand(false, angle); } }
private static object CoerceZoomTick(DependencyObject d, object value) { double minZoomTick = (double)value; ZoomBoxPanel panel = d as ZoomBoxPanel; if (panel != null) { if (minZoomTick > panel.MaxZoomTick) { return(panel.MaxZoomTick); } if (minZoomTick < panel.MinZoomTick) { minZoomTick = panel.MinZoomTick; } } return(minZoomTick); }
private static object CoerceMaxZoom(DependencyObject d, object value) { double num = (double)value; ZoomBoxPanel panel = d as ZoomBoxPanel; if (panel != null) { if (num < panel.MinZoom) { panel.MinZoom = num; } if (panel.Zoom > num) { panel.Zoom = num; } } return(num); }