My program works well.
<Window.Resources>
<ResourceDictionary Source="GlassButton.xaml">
</ResourceDictionary>
</Window.Resources>
But after adding DataGrid on the “MainWindow” shows error in string:
<ResourceDictionary Source="GlassButton.xaml">
The part of Window.Resources has changed after adding DataGrid and it became like that:
<Window.Resources>
<ResourceDictionary Source="GlassButton.xaml">
<my:DepartmentDataSet x:Key="DepartmentDataSet" />
<CollectionViewSource x:Key="DepViewSource" Source="{Binding Path=DEP, Source={StaticResource DepartmentDataSet}}" />
</ResourceDictionary>
The error message shows:
“Property “System.Windows.ResourceDictionary.DeferrableContent” is called exception.”: Number of row “10” and position in a row “29”.
With best regards
I’ve found the reason. I need to put code in “< ResourceDictionary.Merged >”. With this added code program works very well!