public MagnifierAdorner(UIElement element, Magnifier magnifier) : base(element) { _magnifier = magnifier; _currentZoomFactor = _magnifier.ZoomFactor; UpdateViewBox(); AddVisualChild(_magnifier); Loaded += (s, e) => InputManager.Current.PostProcessInput += OnProcessInput; Unloaded += (s, e) => InputManager.Current.PostProcessInput -= OnProcessInput; }
public static void SetMagnifier(UIElement element, Magnifier value) { element.SetValue(CurrentProperty, value); }