Class TreeGridVirtualizingCellRenderer<D, E>
TreeGridVirtualizingCellRenderer 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
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 TreeGridVirtualizingCellRendererBase. While this class does at the moment not add meaningful functionality to TreeGridVirtualizingCellRendererBase we created this extra layer of inheritance to make it easy to share code for the TreeGridVirtualizingCellRendererBase 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.TreeGrid.Renderers
Assembly: Syncfusion.Grid.WinUI.dll
Syntax
public abstract class TreeGridVirtualizingCellRenderer<D, E> : TreeGridVirtualizingCellRendererBase<D, E>, ITreeGridCellRenderer, IDisposable where D : FrameworkElement, new()
where E : FrameworkElement, new()
Type Parameters
Name | Description |
---|---|
D | D is a DisplayElement which is used to display the value on initilal loading of treegrid |
E | E is a EditElement which is used to show the displayed data in the edit mode |
Constructors
TreeGridVirtualizingCellRenderer()
Initializes a new instance of TreeGridVirtualizingCellRenderer<D, E> class.
Declaration
protected TreeGridVirtualizingCellRenderer()
Properties
EditorType
Gets or sets the Editor type.
Declaration
public Type EditorType { get; set; }
Property Value
Type | Description |
---|---|
System.Type | Return the editor type. |
Methods
CurrentRendererValueChanged()
Invoked when the current renderer changed.
Declaration
protected virtual void CurrentRendererValueChanged()
OnInitializeDisplayElement(TreeDataColumnBase, D, Object)
Initialize the binding for display element of corresponding column.
Declaration
public override void OnInitializeDisplayElement(TreeDataColumnBase dataColumn, D uiElement, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
TreeDataColumnBase | dataColumn | Specifies the dataColumn which contain TreeGridColumn, RowColumnIndex |
D | uiElement | Specifies the display control to initialize binding |
System.Object | dataContext | Specifies the data context of the particular row |
Overrides
OnInitializeEditElement(TreeDataColumnBase, E, Object)
Initialize the binding for editor control of corresponding column.
Declaration
public override void OnInitializeEditElement(TreeDataColumnBase dataColumn, E uiElement, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
TreeDataColumnBase | dataColumn | Specifies the dataColumn which contain TreeGridColumn, RowColumnIndex |
E | uiElement | Specifies the data context of the particular row |
System.Object | dataContext | Specifies the data context of the particular row |
Overrides
OnInitializeTemplateElement(TreeDataColumnBase, ContentControl, Object)
Initialize the binding for TreeGridCell by Columns's CellTemplate and CellTemplateSelector.
Declaration
public override void OnInitializeTemplateElement(TreeDataColumnBase dataColumn, ContentControl uiElement, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
TreeDataColumnBase | dataColumn | Specifies the dataColumn which contain TreeGridColumn, RowColumnIndex |
Microsoft.UI.Xaml.Controls.ContentControl | uiElement | Specifies the display control to initialize binding |
System.Object | dataContext | Specifies the data context of the particular row |
Overrides
OnUpdateDisplayBinding(TreeDataColumnBase, D, Object)
Updates the binding for display element of corresponding column.
Declaration
public override void OnUpdateDisplayBinding(TreeDataColumnBase dataColumn, D uiElement, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
TreeDataColumnBase | dataColumn | Specifies the TreeDataColumnBase. |
D | uiElement | Specifies the data context of the particular row. |
System.Object | dataContext | Specifies the data context of the particular row. |
Overrides
OnUpdateEditBinding(TreeDataColumnBase, E, Object)
Updates the binding for editor control of corresponding column.
Declaration
public override void OnUpdateEditBinding(TreeDataColumnBase dataColumn, E element, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
TreeDataColumnBase | dataColumn | Specifies the TreeDataColumnBase. |
E | element | Specifies the data context of the particular row. |
System.Object | dataContext | Specifies the data context of the particular row. |
Overrides
OnUpdateTemplateBinding(TreeDataColumnBase, ContentControl, Object)
Updates the binding for the TreeGridCell by Column's CellTemplate and CellTemplateSelector.
Declaration
public override void OnUpdateTemplateBinding(TreeDataColumnBase dataColumn, ContentControl uiElement, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
TreeDataColumnBase | dataColumn | Specifies the dataColumn which contain TreeGridColumn, RowColumnIndex |
Microsoft.UI.Xaml.Controls.ContentControl | uiElement | Specifies the display control to initialize binding |
System.Object | dataContext | Specifies the data context of the particular row |
Overrides
ShouldGridTryToHandleKeyDown(KeyRoutedEventArgs)
Handles the key interaction with editor of corresponding column.
Declaration
protected override bool ShouldGridTryToHandleKeyDown(KeyRoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.UI.Xaml.Input.KeyRoutedEventArgs | e | A Microsoft.UI.Xaml.Input.KeyRoutedEventArgs 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)
Method to return the horizontal alignment for the text.
Declaration
protected HorizontalAlignment TextAlignmentToHorizontalAlignment(TextAlignment textAlignment)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.UI.Xaml.TextAlignment | textAlignment | The text alignment. |
Returns
Type | Description |
---|---|
Microsoft.UI.Xaml.HorizontalAlignment | HorizontalAlignment of text |