WPF DataGrid button style

Posted by imekon on Stack Overflow See other posts from Stack Overflow or by imekon
Published on 2010-05-29T09:46:15Z Indexed on 2010/05/29 9:52 UTC
Read the original article Hit count: 406

Filed under:
|
|
|

If I have a DataGrid in a XAML form, and add the following style:

  <Style TargetType="Button">
      <Setter Property="Margin" Value="2"/>
  </Style>

The data grid locks up the application. I found if I put the style into a resource block that isn't seen by any data grid, then it seems to be happy. However, if I want to have the style above applied to all buttons on my window, I have to put it in various resource blocks that cannot be seen by the data grid.

Is there any way to avoid this?

© Stack Overflow or respective owner

Related posts about wpf

Related posts about datagrid