Ribbonbar Button and commandbinding

Ribbon for WPF Forum

Posted 7 years ago by Arthur Damen
Version: 11.2.0551
Avatar
Hi,
I have a ribbonbar with a actipro button.
When I hit this Start button something is started at the background.

Another buttons checks the state (cancel) of the process and must become enabled when the process is running.
Both buttons have a commandbinding and check the state.

When running i notice that when I hit the start button the cancel button is not getting enabled. Only when i click on the ribbon somewhere, or minimize/maximize the window the button gets enabled???????
is there a way to tell the ribbon to start checking...

Comments (1)

Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Arthur,

It's WPF's routed command handling that governs this, not our controls. It would be the same if you had a WPF ToolBar in place of our Ribbon.

Commands enable and disable based on where the keyboard focus currently is. WPF will look up the visual tree to try and find a handler for each command. If found and the command can execute it will enable the related toolbar/ribbon button.

In your case, it sounds like your focus isn't in the right spot to allow this check to occur. Perhaps try focusing within your Window's content area before starting your background process.


Actipro Software Support

The latest build of this product (v2018.1 build 0675) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.