I have created a checkbox column in a WPF DataGrid, and I have set the column header to be a checkmark image. Here is my markup:
<toolkit:DataGridCheckBoxColumn Binding="{Binding Completed}" Width="25" IsReadOnly="false" >
<toolkit:DataGridCheckBoxColumn.Header>
<Image Source="..\Resources\Images\checkmark.png" Height="9" Width="9" Margin="3,0,0,0" />
</toolkit:DataGridCheckBoxColumn.Header>
</toolkit:DataGridCheckBoxColumn>
I would like to convert that header into a resource (for example, "CheckmarkHeader", so that I can invoke it in other grids using a data grid column's HeaderStyle property--something like this:
<toolkit:DataGridCheckBoxColumn ... HeaderStyle="CheckmarkHeader ... />
Can that be done? How would I do it? Thanks for your help.