The RadRibbonWindow control is used to define a specialized window that is pre-configured with
a RadRibbonBar to emulate MS Office UI in Silverlight.
An application that will use the new RadRibbonWindow should be configured to run in out-of-browser mode and
also to require elevated trust permissions with one of these options: No Border or Borderless Round Corners (the preferred one).
This tutorial will walk you through the task of defining a RadRibbonWindow in your application.
Configuration
First you need to configure your Silverlight project. Right click on it and choose Properties. Then you should enable the out of
browser option:
Then you need to click on the Out-of-Browser Settings… button and check the
Require Elevated Trust. Also, make sure that the WindowStyle is
Borderless Round Corners:
Define the RadRibbonWindow in the application
CopyXAML
<UserControl x:Class="RadRibbonWindowOOB.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
<telerik:RadRibbonWindow>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<telerik:RadRibbonBar HelpButtonVisibility="Visible" x:Name="radRibbonBar1" ApplicationName="Telerik Word"
Title="Document1" ApplicationButtonImageSource="Images/RibbonBar/IconMSOffice/AppIcon.png"
telerik:KeyTipService.IsKeyTipsEnabled="True" MinimizeButtonVisibility="Visible">
<telerik:RadRibbonBar.ApplicationMenu>
...
</telerik:RadRibbonBar.ApplicationMenu>
<telerik:RadRibbonBar.QuickAccessToolBar>
...
</telerik:RadRibbonBar.QuickAccessToolBar>
<telerik:RadRibbonTab Header="Home">
...
</telerik:RadRibbonTab>
<telerik:RadRibbonTab Header="Page Layout" telerik:KeyTipService.AccessText="P"></telerik:RadRibbonTab>
<telerik:RadRibbonTab Header="References" telerik:KeyTipService.AccessText="S"></telerik:RadRibbonTab>
<telerik:RadRibbonTab Header="Mailings" telerik:KeyTipService.AccessText="M"></telerik:RadRibbonTab>
<telerik:RadRibbonTab Header="Review" telerik:KeyTipService.AccessText="R"></telerik:RadRibbonTab>
<telerik:RadRibbonTab Header="View" telerik:KeyTipService.AccessText="W"></telerik:RadRibbonTab>
</telerik:RadRibbonBar>
<Grid Grid.Row="1">
//content
</Grid>
</Grid>
</telerik:RadRibbonWindow>
</UserControl> Now, when you hit F5 you should get the following result:
In order to run the project in OOB you need to install it:
Then you should get the final result:
Themes
The RadRibbonWindow comes with full support for all our predefined themes
(Office Black, Office Blue, Office Silver, Summer, Vista, Windows 7, Transparent, Expression Dark, Metro), so you can choose the most
suitable for your needs.
More information and a sample project using the RadRibbonWindow for Silverlight,
can be found
here.