In This Article

DataGridPartEditBoxColumnBase<T> Class

Represents a base class for data-bound columns for use in a DataGrid that utilize PartEditBoxBase-derived controls.

public abstract class DataGridPartEditBoxColumnBase<T> : DataGridBoundColumnBase
Type Parameters:
T -

The type of value being edited.

Inheritance:
object DataGridColumn DataGridBoundColumn DataGridBoundColumnBase object
Derived:
DataGridBrushColumn DataGridByteColumn DataGridColorColumn DataGridCornerRadiusColumn DataGridDateTimeColumn DataGridDoubleColumn DataGridEnumColumn DataGridGuidColumn DataGridInt16Column DataGridInt32Column DataGridInt32RectColumn DataGridInt64Column DataGridPointColumn DataGridRectColumn DataGridSingleColumn DataGridSizeColumn DataGridThicknessColumn DataGridTimeSpanColumn DataGridVectorColumn

Constructors

DataGridPartEditBoxColumnBase()

Initializes an instance of the class.

protected DataGridPartEditBoxColumnBase()

Properties

CommitTriggers

Gets or sets the triggers that will force this control to commit any changes.

public PartEditBoxCommitTriggers CommitTriggers { get; set; }

Property Value

PartEditBoxCommitTriggers:

A PartEditBoxCommitTriggers indicating the triggers that will force this control to commit any changes. The default value is PartEditBoxCommitTriggers.Default.

DefaultEditingElementStyle

Gets the default value for the EditingElementStyleProperty dependency property.

public static Style DefaultEditingElementStyle { get; }

Property Value

Style:

The default value for the EditingElementStyleProperty dependency property.

DefaultElementStyle

Gets the default value for the EditingElementStyleProperty dependency property.

public static Style DefaultElementStyle { get; }

Property Value

Style:

The default value for the EditingElementStyleProperty dependency property.

HasPopup

Gets or sets a value indicating whether the control has a popup available.

public bool HasPopup { get; set; }

Property Value

bool:

true if the control has a popup available; otherwise false. The default value is true.

IsArrowKeyPartNavigationEnabled

Gets or sets a value indicating whether the left/right arrow keys can be used to move between and select editable parts.

public bool IsArrowKeyPartNavigationEnabled { get; set; }

Property Value

bool:

true if the left/right arrow keys can be used to move between and select editable parts; otherwise false. The default value is true.

IsEditable

Gets or sets a value indicating whether the edit box's text area is editable.

public bool IsEditable { get; set; }

Property Value

bool:

true if the edit box's text area is editable; otherwise false. The default value is true.

Remarks

When false, the edit box behaves more like a ComboBox.

IsNullAllowed

Gets or sets a value indicating whether null values are allowed to be entered by the user.

public bool IsNullAllowed { get; set; }

Property Value

bool:

true if null values are allowed to be entered by the user; otherwise false. The default value is false.

IsUndoEnabled

Gets or sets whether undo/redo support is enabled for the text-editing portion of the control.

public bool IsUndoEnabled { get; set; }

Property Value

bool:

true if undo/redo support is enabled for the text-editing portion of the control. The default value is true.

PlaceholderText

Gets or sets the text that is displayed in the control until the value is changed by a user action or some other operation.

public string PlaceholderText { get; set; }

Property Value

string:

The text that is displayed in the control until the value is changed by a user action or some other operation.

SpinWrapping

Gets or sets the wrapping behavior used when spinning past a minimum or maximum value in the active part.

public SpinWrapping SpinWrapping { get; set; }

Property Value

SpinWrapping:

The wrapping behavior used when spinning past a minimum or maximum value in the active part. The default value is SpinWrapping.NoWrap.

SpinnerVisibility

Gets or sets a value indicating if and when the control has a spinner available.

public SpinnerVisibility SpinnerVisibility { get; set; }

Property Value

SpinnerVisibility:

A value indicating if and when the control has a spinner available. The default value is SpinnerVisibility.Collapsed.

TextAlignment

Gets or sets the text alignment of the text editing area.

public TextAlignment TextAlignment { get; set; }

Property Value

TextAlignment:

The text alignment of the text editing area. The default value is TextAlignment.Left.

Methods

ApplyStandardValues(FrameworkElement)

Applies standard values to the specified target element.

protected virtual void ApplyStandardValues(FrameworkElement targetElement)
Parameter Type Description
targetElement FrameworkElement

The target element.

GenerateEditBox(bool, DataGridCell)

Generates an instance of a PartEditBoxBase-derived object.

protected virtual PartEditBoxBase<T> GenerateEditBox(bool isEditing, DataGridCell cell)
Parameter Type Description
isEditing bool

Whether the edit box will be used for editing.

cell DataGridCell

The cell.

Returns

PartEditBoxBase<T>:

An instance of a PartEditBoxBase-derived object.

GenerateEditingElement(DataGridCell, object)

Generates the editing element.

protected override FrameworkElement GenerateEditingElement(DataGridCell cell, object dataItem)
Parameter Type Description
cell DataGridCell

The cell.

dataItem object

The data item.

Returns

FrameworkElement:

The FrameworkElement to use for editing.

GenerateElement(DataGridCell, object)

Generates the display element.

protected override FrameworkElement GenerateElement(DataGridCell cell, object dataItem)
Parameter Type Description
cell DataGridCell

The cell.

dataItem object

The data item.

Returns

FrameworkElement:

The FrameworkElement to use for display.

GetEditBoxType()

Gets the type of the associated PartEditBoxBase-derived control.

protected abstract Type GetEditBoxType()

Returns

Type:

The type of the associated PartEditBoxBase-derived control.

PrepareCellForEdit(FrameworkElement, RoutedEventArgs)

Prepares the cell for edit.

protected override object PrepareCellForEdit(FrameworkElement editingElement, RoutedEventArgs editingEventArgs)
Parameter Type Description
editingElement FrameworkElement

The editing element.

editingEventArgs RoutedEventArgs

The RoutedEventArgs instance containing the event data.

Returns

object

Fields

CommitTriggersProperty

Identifies the CommitTriggers dependency property. This field is read-only.

public static readonly DependencyProperty CommitTriggersProperty

HasPopupProperty

Identifies the HasPopup dependency property. This field is read-only.

public static readonly DependencyProperty HasPopupProperty

IsArrowKeyPartNavigationEnabledProperty

Identifies the IsArrowKeyPartNavigationEnabled dependency property. This field is read-only.

public static readonly DependencyProperty IsArrowKeyPartNavigationEnabledProperty

IsEditableProperty

Identifies the IsEditable dependency property. This field is read-only.

public static readonly DependencyProperty IsEditableProperty

IsNullAllowedProperty

Identifies the IsNullAllowed dependency property. This field is read-only.

public static readonly DependencyProperty IsNullAllowedProperty

IsUndoEnabledProperty

Identifies the IsUndoEnabled dependency property. This field is read-only.

public static readonly DependencyProperty IsUndoEnabledProperty

PlaceholderTextProperty

Identifies the PlaceholderText dependency property. This field is read-only.

public static readonly DependencyProperty PlaceholderTextProperty

SpinWrappingProperty

Identifies the SpinWrapping dependency property. This field is read-only.

public static readonly DependencyProperty SpinWrappingProperty

SpinnerVisibilityProperty

Identifies the SpinnerVisibility dependency property. This field is read-only.

public static readonly DependencyProperty SpinnerVisibilityProperty

TextAlignmentProperty

Identifies the TextAlignment dependency property. This field is read-only.

public static readonly DependencyProperty TextAlignmentProperty

Inherited Members