NewRowTemplateBehavior Class
Provides attached behavior for DataGrid controls to customize the new row template.
public static class NewRowTemplateBehavior
- Inheritance:
- Object Object
Methods
GetDefaultTemplate(DataGrid)
Gets the value of the DefaultTemplateProperty attached property for a specified DataGrid.
public static ControlTemplate GetDefaultTemplate(DataGrid obj)
Parameter | Type | Description |
---|---|---|
obj | DataGrid | The object to which the attached property is retrieved. |
Returns
- ControlTemplate:
The default ControlTemplate to use for rows in a DataGrid.
GetTemplate(DataGrid)
Gets the value of the TemplateProperty attached property for a specified DataGrid.
public static ControlTemplate GetTemplate(DataGrid obj)
Parameter | Type | Description |
---|---|---|
obj | DataGrid | The object to which the attached property is retrieved. |
Returns
- ControlTemplate:
The ControlTemplate to use for the "new" row in a DataGrid.
SetTemplate(DataGrid, ControlTemplate)
Sets the value of the TemplateProperty attached property to a specified DataGrid.
public static void SetTemplate(DataGrid obj, ControlTemplate value)
Parameter | Type | Description |
---|---|---|
obj | DataGrid | The object to which the attached property is written. |
value | ControlTemplate | A value indicating the ControlTemplate to use for the "new" row in a DataGrid. |
Fields
DefaultTemplateProperty
Identifies the read-only DefaultTemplate
dependency property. This field is read-only.
public static readonly DependencyProperty DefaultTemplateProperty
TemplateProperty
Identifies the Template
attached dependency property. This field is read-only.
public static readonly DependencyProperty TemplateProperty