Class SpreadsheetRichTextBoxCellRenderer
Represents a class which holds the cell renderer that displays RichText 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 SpreadsheetRichTextBoxCellRenderer : SpreadsheetVirtualizingCellRendererBase<RichTextBox, RichTextBox>, ISpreadsheetCellRenderer, IDisposable
Constructors
SpreadsheetRichTextBoxCellRenderer()
Initializes a new instance of the SpreadsheetRichTextBoxCellRenderer class.
Declaration
public SpreadsheetRichTextBoxCellRenderer()
Methods
GetControlValue()
Invoked to get the control value of the current cell .
Declaration
public override object GetControlValue()
Returns
Type | Description |
---|---|
System.Object | The RichTextBox value as Flow document. |
Overrides
GetFormattedText(IStyle)
Gets the formatted text of current cell based on style info.
Declaration
public override string GetFormattedText(IStyle style)
Parameters
Type | Name | Description |
---|---|---|
IStyle | style | an instance of IStyle. |
Returns
Type | Description |
---|---|
System.String | Text content of current cell. |
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, RichTextBox, SpreadsheetColumn)
Invoked when display element is initialized on the cell.
Declaration
protected override void OnInitializeDisplayElement(RowColumnIndex rowColumnIndex, RichTextBox uiElement, SpreadsheetColumn column)
Parameters
Type | Name | Description |
---|---|---|
RowColumnIndex | rowColumnIndex | Coordinates of a cell. |
System.Windows.Controls.RichTextBox | uiElement | An instance of System.Windows.Controls.RichTextBox. |
SpreadsheetColumn | column | An instance of SpreadsheetColumn. |
Overrides
OnInitializeEditElement(RowColumnIndex, RichTextBox, SpreadsheetColumn)
Initialize the edit element of RichTextBox on the cell.
Declaration
protected override void OnInitializeEditElement(RowColumnIndex rowColumnIndex, RichTextBox uiElement, SpreadsheetColumn column)
Parameters
Type | Name | Description |
---|---|---|
RowColumnIndex | rowColumnIndex | Coordinates of a cell. |
System.Windows.Controls.RichTextBox | uiElement | An instance of System.Windows.Controls.RichTextBox. |
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()
Save the modified cell value to the given range.
Declaration
protected override void OnSaveChanges()
Overrides
OnUnwireEditUIElement(RichTextBox)
Unwire or unhook the events associated with the edit UIElement.
Declaration
protected override void OnUnwireEditUIElement(RichTextBox uiElement)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Controls.RichTextBox | uiElement | An instance of System.Windows.Controls.RichTextBox. |
Overrides
OnUpdateEditCellStyle(RowColumnIndex, RichTextBox, SpreadsheetColumn)
Update the cell style and content of edit element.
Declaration
protected override void OnUpdateEditCellStyle(RowColumnIndex cellRowColumnIndex, RichTextBox uiElement, SpreadsheetColumn column)
Parameters
Type | Name | Description |
---|---|---|
RowColumnIndex | cellRowColumnIndex | Coordinates of a cell. |
System.Windows.Controls.RichTextBox | uiElement | An instance of System.Windows.Controls.RichTextBox. |
SpreadsheetColumn | column | An instance of SpreadsheetColumn. |
Overrides
OnWireEditUIElement(RichTextBox)
Wire or hook the events associated with edit UIElement.
Declaration
protected override void OnWireEditUIElement(RichTextBox uiElement)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Controls.RichTextBox | uiElement | An instance of System.Windows.Controls.RichTextBox. |
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. |