2
votes

How to make the ribbon control quick access toolbar be on the top of my GUI?

enter image description here

So I need the quick access toolbar to appear on top as it does in windows apps such as word and outlook.

Edit: This is my newest code after feedback from other people here:

<r:RibbonWindow
    x:Class="Company.RouteVisualization.MainWindowView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:r="clr-namespace:System.Windows.Controls.Ribbon;assembly=System.Windows.Controls.Ribbon"
    Title="Route Visualization"
    Height="395"
    Width="832"
    TextOptions.TextFormattingMode="Display"
    WindowStyle="None">
    <Grid>
        <r:Ribbon Grid.Row="0" Name="ribbon">
            <r:Ribbon.QuickAccessToolBar>
                <r:RibbonQuickAccessToolBar>
                    <StackPanel Orientation="Horizontal">
                        <r:RibbonButton Label="B1" VerticalAlignment="Center"/>
                        <r:RibbonButton Label="B2" VerticalAlignment="Center"/>
                    </StackPanel>
                </r:RibbonQuickAccessToolBar>
            </r:Ribbon.QuickAccessToolBar>
            <r:RibbonTab Header="Home">
                <r:RibbonGroup Name="groupHome" Header="View">
                    <r:RibbonToggleButton Name="DisplayMapButton" Label="Display Map" IsChecked="True"
                    LargeImageSource="../Resources/Images/Earth.png" 
                    RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                    <r:RibbonToggleButton Name="OnlineButton" Label="Online"    
                    LargeImageSource="../Resources/Images/Online.png"     
                    RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                </r:RibbonGroup>
            </r:RibbonTab>
        </r:Ribbon>
    </Grid>
</r:RibbonWindow>
1
you can set WindowStyle=None in you window tag in xaml, but this will also won't show the controlBox (Maximize, minimize and close buttons) ...Omri Btian
Nope that is not what I need. I need the max, min and close buttons :)user2381422
You could just do what Omribitan says, and just create your control buttons. (That's what I've had to do on one of my own projects).Sam
Then what @Sam said is the way to go ...Omri Btian
Well yeah! Why did you delete your answer?! :(user2381422

1 Answers