protected override void OnAttached() { base.OnAttached(); keyboardHelper = new KeyboardHelper(this.AssociatedObject); this.AssociatedObject.KeyDown += new KeyEventHandler(AssociatedObject_KeyDown); }