Routed UI Commands not firing on buttons in backstage groups?

May 13, 2013 at 4:59 AM
Edited May 13, 2013 at 5:00 AM
I've integrated the Fluent ribbon into my app, and all of the buttons on regular tabs are working great and firing my routed UI commands perfectly. Unfortunately the same buttons on the backstage aren't working. Here's the XAML snippet I'm using:
<Fluent:Backstage Header="{Binding FileTabLabel, Source={StaticResource Resources}}">
    <Fluent:BackstageTabControl>
        <Fluent:Button Header="{Binding SaveCommandLabel, Source={StaticResource Resources}}" Command="ApplicationCommands.Save"/>
        <Fluent:Button Header="{Binding SaveAsCommandLabel, Source={StaticResource Resources}}" Command="ApplicationCommands.SaveAs"/>
        <Fluent:Button Header="{Binding OpenCommandLabel, Source={StaticResource Resources}}" Command="ApplicationCommands.Open"/>
    </Fluent:BackstageTabControl>
</Fluent:Backstage>
None of the command handlers get fired when the buttons are clicked. Backstage just closes.

Is this a known issue? Or am I doing something wrong? Thanks!
Developer
May 18, 2013 at 1:55 PM
I will have a look at the project i am working at at work, as i'm pretty sure we are using some in the backstage and they work pretty well.
Aug 14, 2013 at 1:07 PM
Edited Aug 14, 2013 at 1:09 PM
I'm having the same issue.

I had to fix at as follow... but this is not elegant
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:viewModels="clr-namespace:xxxxxxxx"
                    xmlns:fluent="clr-namespace:Fluent;assembly=Fluent">
    <DataTemplate DataType="{x:Type viewModels:MenuViewModel}">
        <fluent:Ribbon>
            <fluent:Ribbon.Menu>
                
                <fluent:Backstage >
                    <fluent:BackstageTabControl>
                        <fluent:Button Icon="Images\Exit_small.png" Header="Exit" Height="40" Command="{Binding MenuControl.ExitCommand}"></fluent:Button>
                    </fluent:BackstageTabControl>
...
Aug 14, 2013 at 1:20 PM
Woot.... fixed it likes this....
<fluent:Backstage >
                    <fluent:BackstageTabControl>
                        <fluent:Button Icon="Images\Exit_small.png" Header="Exit" Height="40" Command="{Binding DataContext.ExitCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type fluent:Ribbon}}}"></fluent:Button>
                    </fluent:BackstageTabControl>
                </fluent:Backstage>