This is a migrated thread and some comments may be shown as answers.

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

1 Answer 91 Views
RibbonView and RibbonWindow
This is a migrated thread and some comments may be shown as answers.
Martin
Top achievements
Rank 2
Martin asked on 23 Apr 2013, 03:13 PM
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>


1 Answer, 1 is accepted

Sort by
0
Accepted
Kiril Vandov
Telerik team
answered on 26 Apr 2013, 10:53 AM
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.

Tags
RibbonView and RibbonWindow
Asked by
Martin
Top achievements
Rank 2
Answers by
Kiril Vandov
Telerik team
Share this question
or