Have one RadRibbonTab in several radribboncontextualgroup ?

2 posts, 0 answers
  1. Aurore
    Aurore avatar
    58 posts
    Member since:
    Nov 2007

    Posted 04 Mar 2013 Link to this post

    To avoid code duplication, i'd like to use a same radRibbontab in several contextual group
    I've tried this code, but it doesn't work...

    <telerik:RadRibbonTab  Header="CONTENT" ContextualGroupName="contextualCONTENT">
        <telerik:RadRibbonGroup Header="GContent">
            <!-- some ribbon buttons-->
    <telerik:RadRibbonTab  Header="NAV" >
            <Style TargetType="{x:Type telerik:RadRibbonTab}">
                <Setter Property="ContextualGroupName" Value="contextualNAV"/>
                    <DataTrigger Binding="{Binding Protocol}" Value="CONTENT">
                        <Setter Property="ContextualGroupName" Value="contextualCONTENT"/>
        <telerik:RadRibbonGroup Header="G1">
             <!-- some ribbon buttons-->
        <telerik:RadRibbonContextualGroup x:Name="contextualNAV" Header="Outils Exploration" MinWidth="120"
                                                  IsActive="{Binding Protocol, Converter={StaticResource convIsEqual}, ConverterParameter=NAV}"
                                                   Color="Yellow" SelectFirstTabOnActivation="False" />
        <telerik:RadRibbonContextualGroup x:Name="contextualCONTENT"  Header="Outils Codification" MinWidth="120"
                                                   IsActive="{Binding Protocol, Converter={StaticResource convIsEqual}, ConverterParameter=CONTENT}"
                                                   Color="Cyan"  SelectFirstTabOnActivation="False"/>
  2. Pavel R. Pavlov
    Pavel R. Pavlov avatar
    1165 posts

    Posted 07 Mar 2013 Link to this post

    Hello Aurore,

    I am not sure that I understand you clear enough. Can you please elaborate on your scenario? Do you use a full MVVM scenario? Why is it an obstacle for you to define the tab(s) as required? How are you going to implement different logic on different button click events if you share the same definition of that tab? Have you considered using a full MVVM approach as in this online demonstration? Keep in mind that defining the same visual object in more than one place in certain visual tree is considered as bad practice and may lead to unexpected behavior of the control.

    I am looking forward to hearing from you.

    Pavel R. Pavlov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft R3 2016 release webinar banner
Back to Top