1

I am trying to replicate the style and function of the Ribbon Control of WordPad.

In the RibbonApplicationMenu, there is a MRU list showing recent document's file name. When I click on file name, it will have style changes and open the document.

What is the control that houses the file name "test1"? Is it a RibbonButton? A ListBox? A RibbonTextBox? Anyone knows?

enter image description here

KMC
  • 19,548
  • 58
  • 164
  • 253

1 Answers1

1

That is up to you whatever you want to hold inside that area

Try out this code which I posted here. Hope it will clear things

 <Ribbon:Ribbon Grid.Row="0">
            <Ribbon:Ribbon.ApplicationMenu>
                <Ribbon:RibbonApplicationMenu>
                    <Ribbon:RibbonApplicationMenu.AuxiliaryPaneContent>
                        <Grid MinHeight="500">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="30"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>
                            <Border Grid.Row="0" BorderBrush="DarkBlue" BorderThickness="0,0,0,1">
                                <StackPanel  
                                        Orientation="Vertical">
                                    <Label Foreground="DarkBlue" HorizontalAlignment="Left" VerticalAlignment="Center" HorizontalContentAlignment="Left"
                                       VerticalContentAlignment="Center" Content="Hello World"  />
                                </StackPanel>
                            </Border>
                            <ListBox Grid.Row="1">
                                <ListBoxItem>List Box Item 1</ListBoxItem>
                                <ListBoxItem>List Box Item 2</ListBoxItem>
                                <ListBoxItem>List Box Item 3</ListBoxItem>
                                <ListBoxItem>List Box Item 4</ListBoxItem>
                            </ListBox>
                        </Grid>
                    </Ribbon:RibbonApplicationMenu.AuxiliaryPaneContent>
                    <Ribbon:RibbonApplicationMenuItem Header="Hello _Ribbon"   ImageSource="Images\LargeIcon.png"/>
                    <Ribbon:RibbonApplicationMenuItem Header="Hello _Ribbon"   ImageSource="Images\LargeIcon.png"/>
                    <Ribbon:RibbonApplicationMenuItem Header="Hello _Ribbon"   ImageSource="Images\LargeIcon.png"/>
                </Ribbon:RibbonApplicationMenu>

            </Ribbon:Ribbon.ApplicationMenu>


        </Ribbon:Ribbon>
Community
  • 1
  • 1
Haris Hasan
  • 29,856
  • 10
  • 92
  • 122
  • thank you. But what's inside is a RibbonControl because it inherits RibbonControl styles (Yellow background etc.), so it's not a ListBox, so my concern is what kind of Control that is available in .NET. Or is that something I have to write from scratch. – KMC Aug 02 '11 at 11:38
  • You can explore the Ribbon control, It's source code is available at http://wpf.codeplex.com/wikipage?title=WPF%20Ribbon%20Preview – Haris Hasan Aug 02 '11 at 11:39