Ribbon disables all ApplicationMenu commands

Mar 3, 2009 at 1:20 PM
I am having a problem where ApplicationMenu items are initially correctly displayed, but then, as soon as any command is executed, or if I click a menu, everything becomes disabled, and is never reenabled.  My commands are static resources, and those same commands bound to MenuItems are enabled/disabled correctly.  But the ones in ApplicationMenu never become reenabled.  I don't see anyone posting about this, why is it happening?

I was going to create some sample code, but this sample app has the similar behavior as well.  Just change a theme, and then click the round button, everything will be disabled.  Then next time you click, it's reenabled.

Environment: C#, VS2008 SP1, .NET 3.5SP1, Vista

Here is my screenshot.  The first part is initial view.  The second row is the menu (where e.g. Print is enabled) and application menu (where everything is disabled).

Sorry to cross-post to Issues, but I spent hours trying to find a workaround, and I am really frustrated.
Mar 3, 2009 at 1:21 PM
Btw, for the RibbonApplicationMenu.Command, I tried binding to a command class that always return True for CanExecute, and that did not change anything.  I am assuming that something about that top-level command is why everything becomes disabled, but my custom class was not even ever called.
Mar 11, 2009 at 3:20 PM
Doesn't anyone have a workaround or a solution for this?  I cannot wait until V1 for something as big as this problem, and I cannot believe that I would be the only one seeing it.  When the whole menu is disabled, including the ability of the user to exit the application, or set its options, that's a pretty big issue.
Mar 25, 2009 at 2:47 AM
I've encountered the same issue.  In my case I've set FocusManager.IsFocusScope="True" on the Ribbon.  What I noticed is that when I click one of the buttons (say Save which saves a form or New which creates a new form - both insert a UserControl into a ContentPresenter in the window content) the whole Ribbon is Disabled except for the ApplicationMenu button itself.  If I click onto something that accepts focus (the form, a textbox etc) the Ribbon comes back to life with the correct Enabled/Disabled settings.

I've tried implementing a DispatcherTimer that calls CommandManager.InvalidateRequerySuggested() every second just to see if this would work.  Unfortunately this didn't seem to fix the problem.

In the meantime I'm manually setting Focus to the first input control on the form which seems to kick the Ribbon back into life.  I feel like I'm missing something here.
Mar 25, 2009 at 12:09 PM
Thanks for that response, at least that gives me something to try.  My app isn't very form-driven, but I still have input controls, so I will try modifying the focus programmatically.