0
我的程序運行良好。爲什麼「ResourceDictionary」不工作?
<Window.Resources>
<ResourceDictionary Source="GlassButton.xaml">
</ResourceDictionary>
</Window.Resources>
但在「主窗口」添加數據網格後顯示錯誤的字符串:
<ResourceDictionary Source="GlassButton.xaml">
Window.Resources的部分已加入的DataGrid後改變,它變得像:
<Window.Resources>
<ResourceDictionary Source="GlassButton.xaml">
<my:DepartmentDataSet x:Key="DepartmentDataSet" />
<CollectionViewSource x:Key="DepViewSource" Source="{Binding Path=DEP, Source={StaticResource DepartmentDataSet}}" />
</ResourceDictionary>
錯誤消息顯示: 「屬性」System.Windows.ResourceDictionary.DeferrableContent「被稱爲異常。」:行數「10」和行中的位置「29」。 最好的問候