如何在 VS 2012 WPF 应用程序中将数据触发器应用于以下内容?
我试过这个:错误:前景不可访问或识别
<ListView.View>
<GridView AllowsColumnReorder="true"
ColumnHeaderToolTip="Information">
<GridViewColumn DisplayMemberBinding= "{Binding Path=Title , TargetNullValue='No Title Found'}"
Header="Title" Width="100">
<GridViewColumn.CellTemplate>
<DataTemplate>
<DataTemplate.Triggers>
<DataTrigger Binding="{Binding Title}" Value="{x:Null}">
<Setter Property="Foreground" Value="Salmon"/>
</DataTrigger>
</DataTemplate.Triggers>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>
</ListView.View>
我希望它以不同的颜色显示未找到标题
<DataTrigger Binding="{Binding Title}" Value="{x:Null}">
<Setter Property="Foreground" Value="Salmon"/>
</DataTrigger>