Hello,
I have a GridView that contains a column bound to a Boolean value.
I want that the value is not displayed with the default check box, so I wrote a converter that displays a check mark only when the value is true.
If I use the converter only on the DataContext, the column is still displayed with the standard check box:
To have the column displayed normally, I had to define a cell template:
Is it a normal behavior or is there another way to display the column correctly ?
I have a GridView that contains a column bound to a Boolean value.
I want that the value is not displayed with the default check box, so I wrote a converter that displays a check mark only when the value is true.
If I use the converter only on the DataContext, the column is still displayed with the standard check box:
DataContext="{Binding IsTeamMate, Converter={StaticResource BooleanToCheckMark}}"To have the column displayed normally, I had to define a cell template:
<tk:GridViewDataColumn DataContext="{Binding IsTeamMate, Converter={StaticResource BooleanToCheckMark}}"
Header="Already played"
IsGroupable="False" ShowFieldFilters="False" UniqueName="IsTeamMate" Width="30"> <tk:GridViewDataColumn.CellTemplate> <DataTemplate> <TextBlock Text="{Binding IsTeamMate, Converter={StaticResource BooleanToCheckMark}}" /> </DataTemplate> </tk:GridViewDataColumn.CellTemplate></tk:GridViewDataColumn>Is it a normal behavior or is there another way to display the column correctly ?