A WPF application of mine has started throwing this error in the designer view for a window. It compiles and runs without issue, but will not load in designer.
The strangest part of the error, however, is that it only occurs on the first reference to settings. In the code below, if I comment out the first <Setter>
, the error moves down to the next one. If I then uncomment that first <Setter>
, the error moves back to it.
<Style TargetType="{x:Type ComboBox}">
<Setter Property="FontSize" Value="{Binding Source={StaticResource Settings}, Path=Default.setFontSize}" />
</Style>
<Style TargetType="{x:Type TextBox}">
<Setter Property="FontSize" Value="{Binding Source={StaticResource Settings}, Path=Default.setFontSize}" />
</Style>
<Style TargetType="{x:Type Label}">
<Setter Property="Foreground" Value="{Binding Source={StaticResource Settings}, Path=Default.setFontColor}" />
</Style>
Any ideas?