App.xaml异常。提供'System.Windows.Markup.StaticResource'上的值引发异常

时间:2018-01-11 16:46:32

标签: wpf xaml staticresource

我已经为此筹集了其他一些东西,但没有一个答案有帮助。在我的App.xaml文件中,我在资源字典中有大量样式。当我在Windows 7机器上运行时,它运行得非常完美,但是当我在XP机器上运行时,它会因上面的异常而崩溃。不知道有人能帮忙吗?

<Application.Resources>
    <ResourceDictionary>
        <Style TargetType="{x:Type TextBlock}">
            <Setter Property="FontSize" Value="{Binding Source={x:Static my:Settings.Default}, Path=DefaultFontSize}"/>
            <Setter Property="FontFamily" Value="{Binding Source={x:Static my:Settings.Default}, Path=DefaultFontFamily}"/>
        </Style>

同样在这个文件中我有一系列的ResourceDictionary.MergedDictionaries,但问题似乎是x:Static my:Settings.Default。

由于

0 个答案:

没有答案