开发者

wpf remove datagrid left padding

Can somebody please shed some light on how to get rid of the mysterio开发者_C百科us padding on the left? I've tried numerous properties but none seem to affect.

wpf remove datagrid left padding


The padding you are referring to is probably the row header. To remove the row headers, you can set HeadersVisibility="Column" on the DataGrid.

I have seen cases where even with this property set to "Column" some of the rows still show a header. You can work around this by setting RowHeaderWidth="0" on the DataGrid.


I cannot say where the extra padding is because you haven't provided any code. It might be somewhere in the style of the grid.

In such cases the Snoop utility can be very useful: http://snoopwpf.codeplex.com/


There can be many reasons for this. Either the Template you are using has defined some setter property for the GridviewColoums or the GridViewColumns may be inheriting some settings defined in App.xaml or may be because of some settings in Theme (incase you are using one)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜