Move away from RadRibbonBackstageItem when clicking on a button in a MRU list

2 posts, 1 answers
  1. Martin
    Martin avatar
    39 posts
    Member since:
    Sep 2008

    Posted 23 Apr 2013 Link to this post

    Hello there

    I am using the Office_BlueTheme and I am using the new RadRibbonBackstageItem.

    I want to move away from the BackstageItem when I click on a MRU item. Basically I want the same behavior as when IsSelectable="False" 

    Is there a way to manual switch to the default tab?

    This is my MRU template:

    <telerik:RadRibbonBackstageItem Header="Recent" IsDefault="True">
                     <Grid>
                         <Grid.ColumnDefinitions>
                             <ColumnDefinition Width="*" />
                             <ColumnDefinition Width="Auto" />
                             <ColumnDefinition Width="*" />
                         </Grid.ColumnDefinitions>
                         <StackPanel Margin="15 15 0 0">
                             <TextBlock Margin="0 0 0 2" FontSize="14" FontWeight="Bold" Text="Recent Documents" />
                             <Rectangle Height="1">
                                 <Rectangle.Fill>
                                     <LinearGradientBrush MappingMode="Absolute" SpreadMethod="Repeat"
                                         StartPoint="0,0.5" EndPoint="4,0.5">
                                         <GradientStop Offset="0" Color="#40000000" />
                                         <GradientStop Offset="0.5" Color="#40000000" />
                                         <GradientStop Offset="0.501" Color="Transparent" />
                                     </LinearGradientBrush>
                                 </Rectangle.Fill>
                             </Rectangle>
                             <ItemsControl Margin="0 4 0 0">
                                 <ListView ItemsSource="{Binding Path=MruList}" SelectionMode="Single" BorderThickness="0">
                                     <ListView.ItemTemplate>
                                         <DataTemplate>
                                             <telerik:RadRibbonButton Content="{Binding Name}"
                                                                      Command="{Binding DataContext.OpenFromMruCommand,
                                                                                RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ItemsControl}}"
                                                                      CommandParameter="{Binding}"
                                                                      HorizontalAlignment="Stretch"/>
                                         </DataTemplate>
                                     </ListView.ItemTemplate>
                                 </ListView>
                             </ItemsControl>
                         </StackPanel>
                     </Grid>
                 </telerik:RadRibbonBackstageItem>


  2. Answer
    Kiril Vandov
    Admin
    Kiril Vandov avatar
    324 posts

    Posted 26 Apr 2013 Link to this post

    Hello Martin,

    The RadRibbonView have a boolean property IsBackstageOpen and you can use it to acomplish your scenario. You could bind to the IsBackstageOpen property in your view model and change its value when the command triggered by your button is executed. The RadRibbonView have built-in logic to select the last selected RibbonTab once the RadRibbonBackstage is closed.

    I hope this information helps.

    Kind regards,
    Kiril Vandov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top