Instantiating latest prerelease

Oct 16, 2014 at 2:16 PM
Hi

Using the latest pre-release (v3.0) downloaded via Nuget.

What is the basic Xaml required to create a ribbon with an office 2013 theme. I have tried the following, which compiles but doesn't display anything.
<Window x:Class="MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:Fluent="urn:fluent-ribbon"
    Title="MainWindow" Height="350" Width="525">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="4*"/>
            <RowDefinition Height="25*"/>
        </Grid.RowDefinitions>
        <Fluent:Ribbon Grid.Row="0" >
            
            <Fluent:RibbonTabItem Header="Home"/>

        </Fluent:Ribbon>
    </Grid>
</Window>

Do I for example need to add a themes folder when using the NuGet package?

Thanks

Dom
Oct 16, 2014 at 3:00 PM
Dom,

Add this to your App.Xaml inbetween
<Application.Resources>
</Application.Resources>
So that it looks like
<Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Fluent;Component/Themes/Generic.xaml" />
                <ResourceDictionary Source="/Fluent;Component/Themes/Office2013/Generic.xaml" />               
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
That should set the default Theme to Office 2013 for you.
Marked as answer by batzen on 10/23/2014 at 12:49 PM
Oct 16, 2014 at 3:11 PM
Hi Adam

Thanks for the feedback.

That certainly seems to take into account the theme, do you by any chance know what syntax should now be used in the mainwindow xaml to get the ribbon to take over the chrome. It used to be a case of inheriting from RibbonWindow but I'm guessing that this has now changed.
Developer
Oct 16, 2014 at 3:13 PM
It has not changed. Just use RibbonWindow as base class.
Marked as answer by batzen on 10/23/2014 at 12:50 PM
Developer
Oct 23, 2014 at 8:50 PM
By the way, you don't need to include
<ResourceDictionary Source="/Fluent;Component/Themes/Generic.xaml" />
to get the Office 2013 style.
Just including
<ResourceDictionary Source="/Fluent;Component/Themes/Office2013/Generic.xaml" />  
is enough.
Marked as answer by batzen on 10/23/2014 at 12:50 PM