Example #1
0
 public ShortcutAdorner(UIElement adornedElement)
     : base(adornedElement)
 {
     this.adornerControl = new ShortcutAdornerControl(adornedElement);
     this.adornerControl.SetBinding(Control.IsEnabledProperty, new Binding {
         Source = adornedElement, Path = new PropertyPath(ShortcutManager.IsEnabledProperty)
     });
     AddVisualChild(this.adornerControl);
 }
Example #2
0
        static void OnOffsetChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
        {
            ShortcutAdornerControl ctrl = obj as ShortcutAdornerControl;

            if (ctrl != null)
            {
                ctrl.transform.X = ctrl.Offset.X;
                ctrl.transform.Y = ctrl.Offset.Y;
            }
        }
 public ShortcutAdorner(UIElement adornedElement)
     : base(adornedElement)
 {
     this.adornerControl = new ShortcutAdornerControl(adornedElement);
     this.adornerControl.SetBinding(Control.IsEnabledProperty, new Binding { Source = adornedElement, Path = new PropertyPath(ShortcutManager.IsEnabledProperty) });
     AddVisualChild(this.adornerControl);
 }