ApplicationCommands overridden with some controls

Ribbon for WPF Forum

Posted 12 years ago by Vincent van Rooijen
Version: 11.2.0551
Avatar
In my main window (derriving from RibbonWindow) I add a CommandBinding to ApplicationCommands Cut, Copy and Paste.
These bindings execute my custom cut, copy and paste action at top level, unless a child control has its own CommandBinding specified on these ApplicationCommands.

I noticed the bindings were sometimes removed or overridden by other commands. Now I discovered when I open (or close) a docking window with the SyntaxEditor on it, the top level application commands are overriden, which is ofcourse blocking my implementation.

Comments (1)

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Vincent,

I'm not sure what your question is, but that is correct. Commands will only bubble up the visual tree to the first control that has a handler. Like the TextBox, our SyntaxEditor also handles these commands, so any implementations you may have further up the visual tree would not be called when the SyntaxEditor has focus.

The SyntaxEditor will add it's command bindings to it's own CommandBindings collection, so you could manually remove the entries for ApplicationCommands.Cut/Copy/Paste on that collection. But then you'd lose the built-in support for clipboard operations.


Actipro Software Support

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.