0

我在 C:\Program Files\Microsoft Expression\Blend 4\SystemThemes\Wpf 文件夹中找到了内置主题;所以我将 luna 主题 (luna.normalcolor.xaml) 复制到我的应用程序文件夹中,并编辑这个主题以满足我的需要。我还添加了对 PresentationFramework.Luna.dll 的引用。当我打开 luna.normalcolor.xaml 文件时,VS2010 显示错误:在“Control”类型中找不到属性“ContentStringFormat”,如下所示:

<DataTemplate DataType="{x:Type CollectionViewGroup}">
    <ContentPresenter Content="{Binding Path=Name}" 
           ContentStringFormat="{TemplateBinding ContentStringFormat}"/>
</DataTemplate>

我检查了 ContentPresenter 类是否具有 ContentStringFormat 属性。那么是什么导致了这个错误,以及如何解决呢?谢谢你。

4

1 回答 1

2

我不知道这是否正常工作,但我尝试并没有错误

<DataTemplate DataType="{x:Type CollectionViewGroup}">
        <ContentPresenter Content="{Binding Path=Name}" 
                          ContentStringFormat="{TemplateBinding ContentPresenter.ContentStringFormat}" />
</DataTemplate>
于 2012-11-28T11:13:03.503 回答