I have an application that uses a ResourceDictionary to set the styles, which it does nicely. However, the font is a little small and I would like to change that but the resource directory is from a .dll so I can’t edit it.
As you will notice I’m just starting out with dictionaries.
I thought I could override this by using MergedDictionaries and just add a style to override it:
<Application x:Class="IDIUserInterface.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="Windows/WindowMain.xaml" >
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/ReuxablesLegacy;component/mercury.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style TargetType="Window">
<Setter Property="FontSize" Value="12" />
<Setter Property="FontFamily" Value="Arial" />
</Style>
<Style TargetType="Page">
<Setter Property="FontSize" Value="12" />
<Setter Property="FontFamily" Value="Arial" />
</Style>
</ResourceDictionary>
</Application.Resources>
To my shock this actually worked, but only in the design view. As soon as I compiled the code and ran the application the fonts return to their former size.
Is there a reason for this or am I doing something wrong?
Thanks in advance,
SumGuy
If anyone interested I solved it with:
And then added
…into the window header (or substitute Page for pages)