Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
Sharing a toolbars between panes

I'm not sure of the best way to approach the situation:  I have an applications sharing controls on the ribbonwindow.  The user can open/instance multiple ContentPanes, each Contentpane containing a grid.  The filter and insert for the grid needs to be controled by ToggleButtonTool(s) inside a Ribbon/Tab/Group that is shared by all the panes. 

Seems pretty straight forward but how do the buttons work as the user switches tabs if each needs to be mutually exsclusive?

  • 1089
    Verified Answer

    The easiest way I found to do this was : 

    1. Create RoutedCommand (s) for add, filter, etc. 
    2. Bind the Command and CommandParamer attributes for each of the toggleButtontool(s)
    3. Add CommandBindings to the user control(s).

    The binding for the ToggleButtonTool needs to pass a reference to self like so: <igRibbon:ToggleButtonTool  Command="{x:Static local:AppCommands.AllowFilter}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}">