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);
 }
        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);
 }