Class DataGridTextColumn
Represents a Data
Inherited Members
Namespace: System.Windows.Controls
Assembly: OpenSilver.Controls.Data.dll
Syntax
[StyleTypedProperty(Property = "ElementStyle", StyleTargetType = typeof(TextBlock))]
[StyleTypedProperty(Property = "EditingElementStyle", StyleTargetType = typeof(TextBox))]
public class DataGridTextColumn : DataGridBoundColumn, IDependencyObject
Constructors
| Improve this Doc View SourceDataGridTextColumn()
Initializes a new instance of the Data
Declaration
public DataGridTextColumn()
Fields
| Improve this Doc View SourceFontFamilyProperty
Identifies the FontFamily dependency property.
Declaration
public static readonly DependencyProperty FontFamilyProperty
Field Value
Type | Description |
---|---|
Dependency |
Properties
| Improve this Doc View SourceFontFamily
Gets or sets the font name.
Declaration
public FontFamily FontFamily { get; set; }
Property Value
Type | Description |
---|---|
Font |
FontSize
Gets or sets the font size.
Declaration
public double FontSize { get; set; }
Property Value
Type | Description |
---|---|
System. |
FontStyle
Gets or sets the font style.
Declaration
public FontStyle FontStyle { get; set; }
Property Value
Type | Description |
---|---|
Font |
FontWeight
Gets or sets the font weight or thickness.
Declaration
public FontWeight FontWeight { get; set; }
Property Value
Type | Description |
---|---|
Font |
Foreground
Gets or sets a brush that describes the foreground of the column cells.
Declaration
public Brush Foreground { get; set; }
Property Value
Type | Description |
---|---|
Brush |
Methods
| Improve this Doc View SourceCancelCellEdit(FrameworkElement, Object)
Causes the column cell being edited to revert to the specified value.
Declaration
protected override void CancelCellEdit(FrameworkElement editingElement, object uneditedValue)
Parameters
Type | Name | Description |
---|---|---|
Framework |
editingElement | The element that the column displays for a cell in editing mode. |
System. |
uneditedValue | The previous, unedited value in the cell being edited. |
Overrides
| Improve this Doc View SourceGenerateEditingElement(DataGridCell, Object)
Declaration
protected override FrameworkElement GenerateEditingElement(DataGridCell cell, object dataItem)
Parameters
Type | Name | Description |
---|---|---|
Data |
cell | The cell that will contain the generated element. |
System. |
dataItem | The data item represented by the row that contains the intended cell. |
Returns
Type | Description |
---|---|
Framework |
A new Text |
Overrides
| Improve this Doc View SourceGenerateElement(DataGridCell, Object)
Declaration
protected override FrameworkElement GenerateElement(DataGridCell cell, object dataItem)
Parameters
Type | Name | Description |
---|---|---|
Data |
cell | The cell that will contain the generated element. |
System. |
dataItem | The data item represented by the row that contains the intended cell. |
Returns
Type | Description |
---|---|
Framework |
A new, read-only Text |
Overrides
| Improve this Doc View SourcePrepareCellForEdit(FrameworkElement, RoutedEventArgs)
Called when the cell in the column enters editing mode.
Declaration
protected override object PrepareCellForEdit(FrameworkElement editingElement, RoutedEventArgs editingEventArgs)
Parameters
Type | Name | Description |
---|---|---|
Framework |
editingElement | The element that the column displays for a cell in editing mode. |
Routed |
editingEventArgs | Information about the user gesture that is causing a cell to enter editing mode. |
Returns
Type | Description |
---|---|
System. |
The unedited value. |
Overrides
| Improve this Doc View SourceRefreshCellContent(FrameworkElement, String)
Called by the DataGrid control when this column asks for its elements to be updated, because a property changed.
Declaration
protected override void RefreshCellContent(FrameworkElement element, string propertyName)
Parameters
Type | Name | Description |
---|---|---|
Framework |
element | |
System. |
propertyName |