LocalFontProvider is affected by LocalXamlProvider ?
Posted: 20 Sep 2017, 09:34
I have the following directory setup:
If I set my LocalXamlProvider to the directory <root>/Xaml and my LocalFontProvider to directory <root>, everything works fine.
Then I changed the directory of my LocalXamlProvider to <root>, and adjust my code to call LoadXaml with filename prefixed with "Xaml" (e.g. "Xaml/Test.xaml" instead of "Test.xaml"). The Xaml can be loaded correctly, but it fails to load the font.
Is it intended behavior ?
and a xaml file which load a font "Fonts/#Arial Unicode MS", as follows.<root>/Xaml/*.xaml
<root>/Font/*.ttf
Code: Select all
<UserControl x:Class="NoesisTutorial.Tutorial"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:NoesisTutorial"
FontFamily="Fonts/#Arial Unicode MS"
FontSize="20"
mc:Ignorable="d"
d:DesignHeight="800" d:DesignWidth="300">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="NoesisStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<StackPanel>
</StackPanel>
</UserControl>
Then I changed the directory of my LocalXamlProvider to <root>, and adjust my code to call LoadXaml with filename prefixed with "Xaml" (e.g. "Xaml/Test.xaml" instead of "Test.xaml"). The Xaml can be loaded correctly, but it fails to load the font.
Is it intended behavior ?