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
20
Show Hide XamRibbonGroup
posted

I have a requirement to show or hide the ribbon group(s) based on the active content in the XamDockManager. We had visibility attribute for the controls in WPF, but I could not see it in Silverlight. Please help

 

  • 760
    Suggested Answer
    posted

    Hello,

    You can achieve that using Style. Please see the example below:

     

    <ig:XamRibbonGroup Caption="Selection">

                            <ig:XamRibbonGroup.Style>

                                <Style TargetType="igPrim:RibbonGroupControl">

                                    <Setter Property="Behaviors:PropertyBindingBehavior.PropertyBinding">

                                        <Setter.Value>

                                            <Behaviors:PropertyBinding Binding="{Binding Instance.IsVisualizationEnabled, Source={StaticResource ViewModelWrapper}, Converter={StaticResource VisibilityConveter}}" Property="Visibility"/>                                                                                    

                                        </Setter.Value>

                                    </Setter>                                

                                </Style>

                                </ig:XamRibbonGroup.Style>            

                </ig:XamRibbonGroup>

     

     

    Also please see this article  for more information about using Bindings in the Style.

    http://blogs.profitbase.com/tsenn/?p=53

    Thanks,

    Gary