Class SpreadsheetTextBoxCellRenderer
Represents a class which holds the cell renderer that displays System.Windows.Controls.TextBox in a GridCell. Override the methods for initializing content of the cell and arranging the cell visuals.
Inheritance
Inherited Members
Namespace: Syncfusion.UI.Xaml.Spreadsheet.CellRenderer
Assembly: Syncfusion.SfSpreadsheet.WPF.dll
Syntax
public class SpreadsheetTextBoxCellRenderer : SpreadsheetVirtualizingCellRendererBase<TextBlock, TextBox>, ISpreadsheetCellRenderer, IDisposable
Constructors
SpreadsheetTextBoxCellRenderer()
Initializes a new instance of the SpreadsheetTextBoxCellRenderer class.
Declaration
public SpreadsheetTextBoxCellRenderer()
Methods
Dispose(Boolean)
Releases all resources used by the SpreadsheetTextBoxCellRenderer class.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
Overrides
GetControlValue()
Invoked to get the control value of the current cell .
Declaration
public override object GetControlValue()
Returns
Type | Description |
---|---|
System.Object | Text |
Overrides
OnEditElementLoaded(Object, RoutedEventArgs)
Occurs when edit UIElement is loaded into cell.
Declaration
protected override void OnEditElementLoaded(object sender, RoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The source of the event. |
System.Windows.RoutedEventArgs | e | An System.Windows.RoutedEventArgs that contains the event data. |
Overrides
OnInitializeDisplayElement(RowColumnIndex, TextBlock, SpreadsheetColumn)
Invoked when display element is initialized on the cell.
Declaration
protected override void OnInitializeDisplayElement(RowColumnIndex rowColumnIndex, TextBlock uiElement, SpreadsheetColumn column)
Parameters
Type | Name | Description |
---|---|---|
RowColumnIndex | rowColumnIndex | Coordinates of a cell. |
System.Windows.Controls.TextBlock | uiElement | An instance of System.Windows.Controls.TextBlock. |
SpreadsheetColumn | column | An instance of SpreadsheetColumn. |
Overrides
OnInitializeEditElement(RowColumnIndex, TextBox, SpreadsheetColumn)
Invoked when the edit element of textbox is initialized on the cell.
Declaration
protected override void OnInitializeEditElement(RowColumnIndex rowColumnIndex, TextBox uiElement, SpreadsheetColumn column)
Parameters
Type | Name | Description |
---|---|---|
RowColumnIndex | rowColumnIndex | Coordinates of a cell. |
System.Windows.Controls.TextBox | uiElement | An instance of System.Windows.Controls.ComboBox. |
SpreadsheetColumn | column | An instance of SpreadsheetColumn. |
Overrides
OnRender(RowColumnIndex, DrawingContext, Rect, SpreadsheetColumn, Object)
Used to render the content of the cell. It must be override in derived class, and use their own logic to render the content.
Declaration
protected override void OnRender(RowColumnIndex cellRowColumnIndex, DrawingContext dc, Rect cellRect, SpreadsheetColumn column, object textElement)
Parameters
Type | Name | Description |
---|---|---|
RowColumnIndex | cellRowColumnIndex | |
System.Windows.Media.DrawingContext | dc | An instance of System.Windows.Media.DrawingContext. |
System.Windows.Rect | cellRect | An instance System.Windows.Rect of cell. |
SpreadsheetColumn | column | An instance of SpreadsheetColumn. |
System.Object | textElement | Drawing Text. |
Overrides
OnSaveChanges()
Saves the modified text in the specified range.
Declaration
protected override void OnSaveChanges()
Overrides
OnUnwireEditUIElement(TextBox)
Unwire or Unhook the events associated with edit UIElement.
Declaration
protected override void OnUnwireEditUIElement(TextBox uiElement)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Controls.TextBox | uiElement | An instance of System.Windows.Controls.TextBox. |
Overrides
OnUpdateCellStyle(RowColumnIndex, TextBlock, SpreadsheetColumn)
Update the cell style and content for the display element .
Declaration
protected override void OnUpdateCellStyle(RowColumnIndex cellRowColumnIndex, TextBlock uiElement, SpreadsheetColumn column)
Parameters
Type | Name | Description |
---|---|---|
RowColumnIndex | cellRowColumnIndex | Coordinates of a cell. |
System.Windows.Controls.TextBlock | uiElement | An instance of System.Windows.Controls.TextBlock. |
SpreadsheetColumn | column | An instance of SpreadsheetColumn. |
Overrides
OnUpdateEditCellStyle(RowColumnIndex, TextBox, SpreadsheetColumn)
Update the cell style and content for the edit element .
Declaration
protected override void OnUpdateEditCellStyle(RowColumnIndex cellRowColumnIndex, TextBox uiElement, SpreadsheetColumn column)
Parameters
Type | Name | Description |
---|---|---|
RowColumnIndex | cellRowColumnIndex | Coordinates of a cell. |
System.Windows.Controls.TextBox | uiElement | An instance of System.Windows.Controls.TextBox. |
SpreadsheetColumn | column | An instance of SpreadsheetColumn. |
Overrides
OnWireEditUIElement(TextBox)
Wire or hook the events associated with edit UIElement.
Declaration
protected override void OnWireEditUIElement(TextBox uiElement)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Controls.TextBox | uiElement | An instance of System.Windows.Controls.TextBox. |
Overrides
SetControlValue(Object)
Invoked to set the control value of the current cell.
Declaration
public override bool SetControlValue(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | value of the current cell. |
Returns
Type | Description |
---|---|
System.Boolean | True or False. |
Overrides
ShouldGridTryToHandleKeyDown(KeyEventArgs)
Handles all the keydown operations in the current cell.
Declaration
protected override bool ShouldGridTryToHandleKeyDown(KeyEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.KeyEventArgs | e | An System.Windows.Input.KeyEventArgs that contains the event data. |
Returns
Type | Description |
---|---|
System.Boolean | True or False. |