次の方法で共有


DataGridColumn.CellStyle プロパティ

定義

列のセルのレンダリングに使用するスタイルを取得または設定します。

public:
 property System::Windows::Style ^ CellStyle { System::Windows::Style ^ get(); void set(System::Windows::Style ^ value); };
public System.Windows.Style CellStyle { get; set; }
member this.CellStyle : System.Windows.Style with get, set
Public Property CellStyle As Style

プロパティ値

列内のセルをレンダリングするために使用されるスタイル。 登録済みの既定値は null です。 値に影響を与える可能性の詳細については、 DependencyPropertyを参照してください。

注釈

セルのStyleを定義するには、DataGridCellTargetTypeを指定します。

Styleは、テーブル、列、またはセル レベルのセルに適用できます。 列内のすべてのセルにStyleを適用するには、DataGrid.CellStyle プロパティよりも優先されるDataGridColumn.CellStyle プロパティを設定します。 Styleを個々のセルに適用するには、Style プロパティを DataGridCell オブジェクトに直接設定します。このプロパティは、セルに適用する他のすべてのスタイルよりも優先されます。

適用対象

こちらもご覧ください