1
<dxg:GridControl Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" ItemsSource="{Binding Notes}" AutoGenerateColumns="None" ColumnGeneratorTemplateSelector="{StaticResource ColumnTemplateSelector}" dependencyProperties:BestFitColumn.IsEnabled="True" SelectedItem="{Binding SelectedRow}">
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="Priority" Header="{x:Static meta:MetaCommon.Importance}">
<dxg:GridColumn.CellTemplate>
<DataTemplate>
<Image>
<Image.Style>
<Style BasedOn="{StaticResource SmallIcon}" TargetType="Image">
<Style.Triggers>
<DataTrigger Binding="{Binding RowData.Row.Priority}" Value="H">
<Setter Property="Source" Value="{x:Static helper:IconHelper.HighImportance}" />
<Setter Property="ToolTip" Value="{x:Static meta:MetaCommon.High}" />
</DataTrigger>
</Style.Triggers>
</Style>
</Image.Style>
</Image>
</DataTemplate>
我想知道在RowData.Row.Priority = H的情況下是否可以添加文本。我似乎無法自己找到任何方式,並想知道我是否錯過了一些東西,或者是否必須創建一個解決方案,並在本聲明之外做些事情。XAML基於觸發器添加文本