RibbonControl TitleText above RecentItemList?

Dec 23, 2008 at 2:01 PM
Hello!
Has anyone an idea how to get a title text above the RecentItemList of the ribboncontrol?

Regards
Carsten
Dec 23, 2008 at 7:11 PM

The RibbonApplicationMenu.RecentItemList is a FrameworkElement so one solution is to wrap the RibbonHighlightingList in a HeaderedContentControl:

      <Style TargetType="HeaderedContentControl">

        <Setter Property="Focusable" Value="False"/>
        <Setter Property="Template">
          <Setter.Value>
            <ControlTemplate TargetType="HeaderedContentControl">
              <StackPanel>
                <ContentPresenter Margin="2" ContentSource="Header"
      Focusable="False" VerticalAlignment="Center"
                                  TextBlock.Foreground="Navy" TextBlock.FontWeight="Bold"/>
                <Border Margin="2" HorizontalAlignment="Stretch" BorderBrush="LightGray" BorderThickness="0.5"/>
                <ContentPresenter Margin="2" ContentSource="Content" VerticalAlignment="Center"/>
              </StackPanel>
            </ControlTemplate>
          </Setter.Value>
        </Setter>
      </Style>

          <ribbon:RibbonApplicationMenu.RecentItemList>
            <HeaderedContentControl Header="Recent Documents">
              <ribbon:RibbonHighlightingList 
                            MostRecentFileSelected="ribbonApplicationMenu_MostRecentFileSelected"
                            ItemsSource="{DynamicResource MostRecentFiles}"
                            DisplayMemberPath="Name" />
            </HeaderedContentControl>
          </ribbon:RibbonApplicationMenu.RecentItemList>

 

Dec 26, 2008 at 8:10 AM
Hello Carole,

your decision works fine for me.

Thank you very much.

Regards
Carsten