Font-Awesome-WPF
Font-Awesome-WPF copied to clipboard
Conditional Icon Binding on DataGrid
I am trying to conditionally display icons using the below code.
<DataGridTemplateColumn Header="Level">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<fa:FontAwesome Icon="Warning"></fa:FontAwesome>
<DataTemplate.Triggers>
<DataTrigger Binding="{Binding Path=IsError}" Value="True">
<Setter Property="Icon" Value="Stop" />
</DataTrigger>
</DataTemplate.Triggers>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
I am not even able to compile this due to the error
The member "Icon" is not recognized or is not accessible.
Can someone suggest a way to do this?