0
我在C:\ Program Files \ Microsoft Expression \ Blend 4 \ SystemThemes \ Wpf文件夾中找到了內置主題;所以我將luna主題(luna.normalcolor.xaml)複製到我的應用程序文件夾中,並編輯這個主題以適合我的需要。我還添加了對PresentationFramework.Luna.dll的引用。 當我打開luna.normalcolor.xaml文件,VS2010顯示錯誤:房產「ContentStringFormat」型「控制」沒有被發現,下面幾行:WPF控件模板:在'Control'錯誤中未找到屬性'ContentStringFormat'
<DataTemplate DataType="{x:Type CollectionViewGroup}">
<ContentPresenter Content="{Binding Path=Name}"
ContentStringFormat="{TemplateBinding ContentStringFormat}"/>
</DataTemplate>
我檢查了ContentPresenter類有ContentStringFormat屬性。那麼是什麼原因導致 這個錯誤,以及如何解決它?謝謝。