When I do the following:
<!--Ресурсы приложения-->
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary>
<FontFamily x:Key="DefaultFontFamily">/KingsSquare;component/Fonts/HeinrichScriptRegular.ttf#HeinrichScript</FontFamily>
<kingsSquare:Bootstrapper x:Key="Bootstrapper" />
<local:LocalizedStrings xmlns:local="clr-namespace:KingsSquare" x:Key="LocalizedStrings" />
</ResourceDictionary>
<ResourceDictionary Source="Resources/Styles/Buttons.xaml" />
<ResourceDictionary Source="Resources/Styles/Text.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
I can't use DefaultFontFamily
in Buttons.xaml
. The following line in a style inside Buttons.xaml
throws an exception which says that the key is not found.
<Setter Property="FontFamily" Value="{StaticResource DefaultFontFamily}"></Setter>