I write a hello world , and found StaticResource not work, why
Posted: 09 Jul 2020, 14:06
https://github.com/iomeone/gui/blob/760 ... w.xaml#L24
<CheckBox Content="abc1234" FontFamily="{StaticResource FontAwesome}"/>
<CheckBox Content="abc1234" FontFamily="FontAwesome"/>
these two line both work in c# project ,
but only the second works in c++ project . the first one can not set the fontfamily successfully, why?
I place the font in the fonts fold and write a Fonts.xaml in the Styles folder.
then in App.xaml
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Styles/Fonts.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
platform: win10 x64 vs2015
<CheckBox Content="abc1234" FontFamily="{StaticResource FontAwesome}"/>
<CheckBox Content="abc1234" FontFamily="FontAwesome"/>
these two line both work in c# project ,
but only the second works in c++ project . the first one can not set the fontfamily successfully, why?
I place the font in the fonts fold and write a Fonts.xaml in the Styles folder.
then in App.xaml
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Styles/Fonts.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
platform: win10 x64 vs2015