Ok maybe my description was a little bit bad.
I added to my Visual Studio project a Docking & Tabbed MDI Window.
This is working fine.
Now i tried to change the theme from this window, but it's not working for me.
I guess i do a misstake.
How can i easy change the theme for all my windows and the whole project?
I call this in the constructor of the window:
ThemeManager.BeginUpdate();
try
{
ThemeManager.SetAreNativeThemesEnabled(this, true);
ThemeManager.SetTheme(this, ThemeName.HighContrast.ToString());
ThemeManager.ApplyTheme(this);
}
finally
{
ThemeManager.EndUpdate();
}
And this is the generated XAML code:
<Window x:Class="CANape2015Templates.DockingTabbedMdiWindow1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:shared="http://schemas.actiprosoftware.com/winfx/xaml/shared"
xmlns:docking="http://schemas.actiprosoftware.com/winfx/xaml/docking"
Title="DockingTabbedMdiWindow1" Width="620" Height="420">
<!-- TODO: Associate an image with the DocumentWindow and ToolWindows below by setting ImageSource -->
<Grid>
<!-- DockSite -->
<docking:DockSite x:Name="dockSite">
<!-- TODO: Add additional tool windows that will be close initially -->
<docking:DockSite.ToolWindows>
<docking:ToolWindow x:Name="initiallyClosedToolWindow" Title="Initially-Closed">
<TextBlock Margin="3" Text="This tool window was initially closed." TextWrapping="Wrap" />
</docking:ToolWindow>
</docking:DockSite.ToolWindows>
<!-- TODO: Add additional tool windows that should be docked on the left, but in the auto-hide state -->
<!-- NOTE: Use AutoHideTopContainers, AutoHideRightContainers, and AutoHideBottomContainers to dock to other sides -->
<docking:DockSite.AutoHideLeftContainers>
<docking:ToolWindowContainer>
<docking:ToolWindow x:Name="autoHideLeft" Title="Auto Hide Left">
<TextBlock Margin="3" Text="This tool window is in the auto-hide state on the left side."
TextWrapping="Wrap" />
</docking:ToolWindow>
</docking:ToolWindowContainer>
</docking:DockSite.AutoHideLeftContainers>
<!-- NOTE: Split containers can contain two elements, which are typically ToolWindowContainers (with 1 or more tool windows)
and one (and only one) Workspace -->
<docking:SplitContainer>
<docking:SplitContainer Orientation="Vertical">
<!-- NOTE: The Workspace holds the main content, which is typically TabbedMdiHost or StandardMdiHost -->
<docking:Workspace>
<docking:TabbedMdiHost x:Name="tabbedMdiHost">
<docking:TabbedMdiContainer>
<!-- TODO: Add additional document or tool windows -->
<docking:DocumentWindow Title="Document1.txt" Description="Text document" FileName="Document1.rtf">
<TextBox BorderThickness="0" TextWrapping="Wrap" Text="The first document." />
</docking:DocumentWindow>
<docking:DocumentWindow Title="Document2.txt" Description="Text document" FileName="Document2.rtf">
<TextBox BorderThickness="0" TextWrapping="Wrap" Text="The second document." />
</docking:DocumentWindow>
<docking:DocumentWindow x:Name="document3" Title="Document3.txt" Description="Text document"
FileName="Document3.rtf" IsReadOnly="True">
<TextBox BorderThickness="0" TextWrapping="Wrap"
Text="The third document, which is read-only."
IsReadOnly="{Binding ElementName=document3, Path=IsReadOnly}" />
</docking:DocumentWindow>
</docking:TabbedMdiContainer>
</docking:TabbedMdiHost>
</docking:Workspace>
<docking:ToolWindowContainer>
<docking:ToolWindow x:Name="dockedBottom" Title="Docked Bottom">
<TextBlock Margin="3" Text="This tool window is docked below the Workspace."
TextWrapping="Wrap" />
</docking:ToolWindow>
</docking:ToolWindowContainer>
</docking:SplitContainer>
<docking:ToolWindowContainer>
<docking:ToolWindow x:Name="dockedRight" Title="Docked Right">
<TextBlock Margin="3" Text="This tool window is docked to the right of the Workspace."
TextWrapping="Wrap" />
</docking:ToolWindow>
</docking:ToolWindowContainer>
</docking:SplitContainer>
</docking:DockSite>
</Grid>
</Window>
Thanks for help.