Class GridVirtualizingCellRenderer<T>
GridVirtualizingCellRenderer is an abstract base class for cell renderers that need live UIElement visuals displayed in a cell. You can derive from this class and provide the type of the UIElement you want to show inside cells as type paramater. The class provides strong typed virtual methods for initializing content of the cell and arranging the cell visuals. See GridVirtualizingCellRendererBase<T> for more details.
The idea behind this class is to provide a place where we can add general code that should be shared for all cell renderers in the tree derived from GridVirtualizingCellRendererBase. While this class does at the moment not add meaningfull functionality to GridVirtualizingCellRendererBase we created this extra layer of inheritance to make it easy to share code for the GridVirtualizingCellRendererBase base class between grid, tree and common assemblies and keep tree/grid control specific code out of the base class. It is currently not possible with C# to the base class as template type parameter. This is the reason for this copy/paste approach for the codebase for the base class of this class.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Windows.Controls.Grid
Assembly: Syncfusion.Grid.Wpf.dll
Syntax
public abstract class GridVirtualizingCellRenderer<T> : GridVirtualizingCellRendererBase<T>, IGridCellRenderer, ICellRenderer, IHitTestSelectCells, IStyleChanged, IDisposable, IAllowKeepAliveOnlyCurrentCell where T : FrameworkElement, new()
Type Parameters
Name | Description |
---|---|
T | The type of the UIElement that should be placed inside cells |
Constructors
GridVirtualizingCellRenderer()
Initializes a new
Declaration
public GridVirtualizingCellRenderer()
Properties
AllowKeepAliveOnlyCurrentCell
Gets or sets whether the renderer will create the UIElement only when BeginEdit is called for the current cell and the UIElement should be discarded once EndEdit or CancelEdit is called. Setting this option is only valid when SupportsRenderOptimization is enabled.
Declaration
public bool AllowKeepAliveOnlyCurrentCell { get; set; }
Property Value
Type |
---|
System.Boolean |
CurrentCellUIElement
Gets or sets the UI element for the current cell.
Declaration
public T CurrentCellUIElement { get; }
Property Value
Type |
---|
T |
Methods
CreateRendererElement(T, GridRenderStyleInfo)
Initializes the content of the cell using the information from the cell style (value, text, behavior etc.).
Declaration
public override void CreateRendererElement(T uiElement, GridRenderStyleInfo style)
Parameters
Type | Name | Description |
---|---|---|
T | uiElement | The current cell ui element. |
GridRenderStyleInfo | style | The cell style info. |
Overrides
EmptyRecycleBin()
Empties recyclebin.
Declaration
public override void EmptyRecycleBin()
Overrides
EnsureCurrentCellUIElement()
Returns true if current cell holds an UI element.
Declaration
public bool EnsureCurrentCellUIElement()
Returns
Type | Description |
---|---|
System.Boolean | True if current cell has an UI element; false otherwise. |
GetControlTextFromEditor()
Returns the ControlText from the current cell's editor control.
Declaration
public override sealed string GetControlTextFromEditor()
Returns
Type | Description |
---|---|
System.String | ControlText of the current cell editor. |
Overrides
GetControlTextFromEditorCore(T)
Declaration
protected virtual string GetControlTextFromEditorCore(T uiElement)
Parameters
Type | Name | Description |
---|---|---|
T | uiElement |
Returns
Type |
---|
System.String |
GetControlValueFromEditor()
Declaration
protected override object GetControlValueFromEditor()
Returns
Type |
---|
System.Object |
Overrides
GetControlValueFromEditorCore(T)
Declaration
protected virtual object GetControlValueFromEditorCore(T uiElement)
Parameters
Type | Name | Description |
---|---|---|
T | uiElement |
Returns
Type |
---|
System.Object |
OnCancelMouseCapture(UIElement)
Declaration
protected override void OnCancelMouseCapture(UIElement element)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.UIElement | element |
Overrides
OnInitializeContent(T, GridRenderStyleInfo)
Initializes the content of the cell when in edit mode using the information from the cell style (value, text, behavior etc.).
Declaration
public override void OnInitializeContent(T uiElement, GridRenderStyleInfo style)
Parameters
Type | Name | Description |
---|---|---|
T | uiElement | The current cell ui element. |
GridRenderStyleInfo | style | The cell style info. |
Overrides
OnRecaptureMouse(UIElement)
Declaration
protected override void OnRecaptureMouse(UIElement element)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.UIElement | element |
Overrides
OnUnwireUIElement(T)
Declaration
protected override void OnUnwireUIElement(T uiElement)
Parameters
Type | Name | Description |
---|---|---|
T | uiElement |
Overrides
OnWireUIElement(T)
Declaration
protected override void OnWireUIElement(T uiElement)
Parameters
Type | Name | Description |
---|---|---|
T | uiElement |
Overrides
RaiseGridPreviewMouseMove(RowColumnIndex, MouseEventArgs)
Triggers GridPreviewMouseMove event.
Declaration
public override void RaiseGridPreviewMouseMove(RowColumnIndex rci, MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
RowColumnIndex | rci | The cell row column index. |
System.Windows.Input.MouseEventArgs | e | A |
Overrides
RefreshContent()
Refreshes the content of current cell.
Declaration
public override void RefreshContent()
Overrides
RollbackTextChange(TextBoxBase)
Declaration
protected void RollbackTextChange(TextBoxBase textBox)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Controls.Primitives.TextBoxBase | textBox |