【WPF】 Stylng Microsoft DataGrid

こちらに DataGrid コントロールのデザインについてまとめてあります。なかなかわかりやすいですね。

Styling Microsoft’s WPF datagrid-microsoft-s-wpf-datagrid.aspx

記事にもありますが、これで100%ではないですが、これだけでもかなり便利な情報がまとまっています。

プロパティ   デフォルト値
Alternating-RowBackground Brush Any Brush Null
Background Brush Any Brush Theme default
ColumnHeaderHeight Double 0 to any positive double NaN
ColumnHeaderStyle Style Any Style Null
ColumnWidth DataGridLength 0 to any positive double, Auto, *, SizeToCells, SizeToHeader SizeTo-Header
HeadersVisibility DataGridHeaders-Visibility All, Row, Column, None All
MaxColumnWidth Double 0 to any positive double Positive Infinity
MaxRowHeight Double 0 to any positive double Positive Infinity
MinColumnWidth Double 0 to any positive double 20
MinRowHeight Double 0 to any positive double 0
RowBackground Brush Any Brush Theme default
RowDetails-VisibilityMode DataGrid-RowDetails-VisibilityMode Visible, Visible-WhenSelected, Collapsed VisibleWhen-Selected
RowHeaders- Width Double 0 to any positive double NaN
RowHeight Double 0 to any positive double NaN
AlternationCount int 2+ coerced to 2
GridLinesVisibility DataGridGridLines-Visibility All, Horizontal, Vertical, None All
Horizontal- GridLinesBrush Brush Any Brush Black(via metadata)
VerticalGrid-LinesBrush Brush Any Brush Black(via metadata)
ItemTemplate DataTemplate Any DataTemplate Null
RowDetails-Template DataTemplate Any DataTemplate Null
CellStyle Style Any Style Null
ItemContainer-Style Style Any Style Null
RowHeaderStyle Style Any Style Null
RowStyle Style Any Style Null
Style Style Any Style Null
Template ControlTemplate ControlTemplate TargetType=Datagrid Null

abc-defg の表記はページ幅の都合のため - を入れてありますが、本来は - 無しの abcdefg となります。

image

各プロパティの詳細についてはまた別途、もしくは参照記事でどうぞw。