Class GridVirtualizingCellRenderer<D, E>
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 parameter. The class provides strong typed virtual methods for initializing content of the cell and arranging the cell visuals. See GridVirtualizingCellRendererBase<D, E> 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 meaningful functionality to GridVirtualizingCellRendererBase we created this extra layer of inheritance to make it easy to share code for the GridVirtualizingCellRendererBase base class between grid and common assemblies and keep grid control specific code out of the base class. It is currently not possible with C# to the base class as template type parameter.
Inheritance
Inherited Members
Namespace: Syncfusion.UI.Xaml.Grid.Cells
Assembly: Syncfusion.SfGrid.WPF.dll
Syntax
public abstract class GridVirtualizingCellRenderer<D, E> : GridVirtualizingCellRendererBase<D, E>, IGridCellRenderer, IDisposable where D : FrameworkElement, new()
where E : FrameworkElement, new()
Type Parameters
Name |
---|
D |
E |
Constructors
GridVirtualizingCellRenderer()
Initializes a new instance of GridVirtualizingCellRenderer<D, E> class.
Declaration
protected GridVirtualizingCellRenderer()
Properties
EditorType
Gets or sets the Editor type.
Declaration
public Type EditorType { get; set; }
Property Value
Type |
---|
System.Type |
Methods
CurrentRendererValueChanged()
Invoked when the current renderer changed.
Declaration
protected virtual void CurrentRendererValueChanged()
OnInitializeDisplayElement(DataColumnBase, D, Object)
Initialize the binding for display element of corresponding column.
Declaration
public override void OnInitializeDisplayElement(DataColumnBase dataColumn, D uiElement, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | Specifies the corresponding DataColumnBase. |
D | uiElement | Specifies the display control to initialize binding. |
System.Object | dataContext | Specifies the data context of the particular row. |
Overrides
OnInitializeEditElement(DataColumnBase, E, Object)
Initialize the binding for editor control of corresponding column.
Declaration
public override void OnInitializeEditElement(DataColumnBase dataColumn, E uiElement, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | Specifies the corrseponding DataColumnBase. |
E | uiElement | Specifies the corrseponding UIElement. |
System.Object | dataContext | Specifies the data context of the particular row. |
Overrides
OnInitializeTemplateElement(DataColumnBase, ContentControl, Object)
Initialize the binding for GridCell by columns's CellTemplate and CellTemplateSelector.
Declaration
public override void OnInitializeTemplateElement(DataColumnBase dataColumn, ContentControl uiElement, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | Specifies the corresponding DataColumnBase. |
System.Windows.Controls.ContentControl | uiElement | Specifies the display control to initialize binding |
System.Object | dataContext | Specifies the data context of the particular row |
Overrides
OnUpdateDisplayBinding(DataColumnBase, D, Object)
Updates the binding for display element of corresponding column.
Declaration
public override void OnUpdateDisplayBinding(DataColumnBase dataColumn, D uiElement, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | Specifies the corresponding DataColumnBase. |
D | uiElement | Specifies the data context of the particular row |
System.Object | dataContext | Specifies the data context of the particular row |
Overrides
OnUpdateEditBinding(DataColumnBase, E, Object)
Updates the binding for editor control of corresponding column.
Declaration
public override void OnUpdateEditBinding(DataColumnBase dataColumn, E element, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | Specifies the corresponding DataColumnBase. |
E | element | Specifies the corresponding renderer element. |
System.Object | dataContext | Specifies the data context of the particular row. |
Overrides
OnUpdateTemplateBinding(DataColumnBase, ContentControl, Object)
Updates the binding for the GridCell by column's CellTemplate and CellTemplateSelector.
Declaration
public override void OnUpdateTemplateBinding(DataColumnBase dataColumn, ContentControl uiElement, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | Specifies the corresponding DataColumnBase. |
System.Windows.Controls.ContentControl | uiElement | Specifies the display control to initialize binding. |
System.Object | dataContext | Specifies the data context of the particular row. |
Overrides
ShouldGridTryToHandleKeyDown(KeyEventArgs)
Handles the key interaction with editor of corresponding column.
Declaration
protected override bool ShouldGridTryToHandleKeyDown(KeyEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.KeyEventArgs | e | A System.Windows.Input.KeyEventArgs that contains event data. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if the parent grid should be allowed to handle keys; otherwise false. |
Overrides
TextAlignmentToHorizontalAlignment(TextAlignment)
Gets the System.Windows.HorizontalAlignment equivalent to the specified System.Windows.TextAlignment.
Declaration
protected HorizontalAlignment TextAlignmentToHorizontalAlignment(TextAlignment textAlignment)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.TextAlignment | textAlignment | The specified System.Windows.TextAlignment. |
Returns
Type | Description |
---|---|
System.Windows.HorizontalAlignment | Returns the System.Windows.HorizontalAlignment. |
UpdateToolTip(DataColumnBase)
Updates the System.Windows.Controls.ToolTip for GridCell.
Declaration
public override void UpdateToolTip(DataColumnBase dataColumn)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | Specifies the DataColumnBase. |