public MagnifierAdorner(UIElement element, Magnifier magnifier)
            : base(element)
        {
            _magnifier = magnifier;
            UpdateViewBox();
            AddVisualChild(_magnifier);

            Loaded   += (s, e) => InputManager.Current.PostProcessInput += OnProcessInput;
            Unloaded += (s, e) => InputManager.Current.PostProcessInput -= OnProcessInput;
        }
Esempio n. 2
0
        private void AttachToMagnifier(UIElement element, Magnifier magnifier)
        {
            _element             = element;
            _element.MouseEnter += Element_MouseEnter;
            _element.MouseLeave += Element_MouseLeave;

            magnifier.Target = _element;

            _adorner = new MagnifierAdorner(_element, magnifier);
        }
Esempio n. 3
0
 public static void SetMagnifier(UIElement element, Magnifier value)
 {
     element.SetValue(CurrentProperty, value);
 }
Esempio n. 4
0
        private static void OnRadiusPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            Magnifier m = (Magnifier)d;

            m.OnRadiusChanged(e);
        }
Esempio n. 5
0
        private static void OnFrameTypeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            Magnifier m = (Magnifier)d;

            m.OnFrameTypeChanged((FrameType)e.OldValue, (FrameType)e.NewValue);
        }
Esempio n. 6
0
        private static void OnZoomFactorPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            Magnifier m = (Magnifier)d;

            m.OnZoomFactorChanged(e);
        }