How to hide rowheaderwidth in xaml

By aj li

I want to hide the rowheaderwidth when my datagrid is readonly. This is the one that you can click to select all items in datagrid.

In datagrid style template:

<Trigger
                 Property="IsReadOnly"
                 Value="True">
                 <Setter
                      Property="RowHeaderWidth"
                     Value="0" />
            </Trigger>

How to hide rowheaderwidth in xaml  (711 Views)