Ribbon Window
Bars includes a RibbonWindow class, which is an implementation of the Window
class and provides a custom window user interface much like that found in Office.
A simple RibbonWindow hosting a RichTextBox
but without any Ribbon
It is always recommended that a Ribbon control implementation be hosted within a RibbonWindow.
While a RibbonWindow can be used without a Ribbon control at all, any Window
object can achieve the same look-and-feel by applying WindowChrome directly on normal Window
objects instead of using RibbonWindow. This is the recommended approach if the Window
will not contain a
Ribbon control.
See the WindowChrome topic for details.
WindowChrome Usage
Each RibbonWindow already has a default WindowChrome assigned that is configured to support the quick access toolbar and other ribbon features. The WindowChrome
is what allows any Window
to have a customized user interface compared to a normal window.
Customizing Ribbon Window Chrome
RibbonWindow is automatically configured with a RibbonWindowChrome instance that sets default properties, like BackdropKind, that are appropriate for a RibbonWindow
. The RibbonWindowChrome class inherits the WindowChrome class.
Important
When defining WindowChrome on a RibbonWindow, it is recommended to use the RibbonWindowChrome class since it is pre-configured with default values appropriate for a RibbonWindow
and future changes to default values will also be implemented through this class.
The following example shows how to modify the WindowChrome for a RibbonWindow to turn off the transparency effect and adjust the alignment of the title bar header:
<bars:RibbonWindow ...
xmlns:bars="http://schemas.actiprosoftware.com/winfx/xaml/bars"
xmlns:themes="http://schemas.actiprosoftware.com/winfx/xaml/themes">
<themes:WindowChrome.Chrome>
<themes:RibbonWindowChrome BackdropKind="None"
TitleBarHeaderAlignment="Center" />
</themes:WindowChrome.Chrome>
</bars:RibbonWindow>
See the WindowChrome topic more details on more advanced customization options like injecting additional content into the title bar.