datagrid column custom check mark

Posted by Berryl on Stack Overflow See other posts from Stack Overflow or by Berryl
Published on 2012-10-07T15:27:56Z Indexed on 2012/10/07 15:37 UTC
Read the original article Hit count: 277

Filed under:
|
|

I want a read only column bound to a boolean that shows a check mark image when true and nothing when false.

The problem is the false value; I just want to show whatever the background of the datagrid is, but I don't see how to clear the image source.

What should the Value of the image source be to do this?

Cheers,
Berryl

<DataGridTemplateColumn.CellTemplate>
    <DataTemplate>
        <Image Name="imgChecked" Source="\Img_Checkmark" />
        <DataTemplate.Triggers>
            <DataTrigger Binding="{Binding IsPrimary}" Value="False">
                <Setter TargetName="imgChecked" Property="Source" Value=""/> *** ??? ***
            </DataTrigger>
        </DataTemplate.Triggers>
    </DataTemplate>
</DataGridTemplateColumn.CellTemplate>

© Stack Overflow or respective owner

Related posts about wpf

Related posts about xaml