private static void OnMagnifierChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { UIElement target = d as UIElement; if (target == null) throw new ArgumentException("Magnifier can only be attached to a UIElement."); MagnifierManager manager = new MagnifierManager(); manager.AttachToMagnifier(target, e.NewValue as Magnifier); }
private static void OnMagnifierChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { UIElement target = d as UIElement; if (target == null) { throw new ArgumentException("Magnifier can only be attached to a UIElement."); } MagnifierManager manager = new MagnifierManager(); manager.AttachToMagnifier(target, e.NewValue as Magnifier); }