ApplicationMenu Footer Buttons and Commands

Ribbon for WPF Forum

Posted 17 years ago by Scott Favre
Version: 1.0.0347
I'm seeing some very odd behavior with buttons in the application menu footer. When I register for the Click event, the buttons work fine. However, when I try to use a command, the button is enabled, but nothing happens in response to the click.

Here is the relevant code:

Creating the command:
cmdExitApplication = new RibbonCommand(
Creating the command binding:
CommandBinding cbndExitApplication = new CommandBinding(
In the XAML:

  <!-- this button works -->
  <ribbon:Button Command="{x:Static commands:Commands.ExitApplication}"/>
    <!-- this button works -->
    <ribbon:Button Click="OnButtonClick"/>

    <!-- this is enabled, but nothing happens when it is clicked -->
    <ribbon:Button Command="{x:Static commands:Commands.ExitApplication}"/>
I've compared my code to the sample application closely, and as far as I can tell, I am not doing anything different. Any suggestions as to how I can get the footer buttons to work?

Thanks for your help

Scott Favre

Comments (2)

Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Scott,

That is odd since it all is working ok in the sample.

It sounds like the command isn't being routed properly for some reason. So perhaps your command binding isn't located in the chain of where it needs to be to be handled? One thing you could do is try setting the CommandTarget on the Button.

If none of that helps, then please email us a small sample project that shows this. Thanks!

Actipro Software Support

Posted 17 years ago by Scott Favre
Thanks. Setting the CommandTarget fixes the problem.
The latest build of this product (v24.1.2) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.