Class TreeGridCellHyperlinkRenderer
Represents the class that loads the Microsoft.UI.Xaml.Controls.HyperlinkButton as editor for TreeGridHyperlinkColumn.
Inheritance
Inherited Members
Namespace: Syncfusion.UI.Xaml.TreeGrid.Renderers
Assembly: Syncfusion.Grid.WinUI.dll
Syntax
public class TreeGridCellHyperlinkRenderer : TreeGridVirtualizingCellRenderer<TextBlock, HyperlinkButton>, ITreeGridCellRenderer, IDisposable
Examples
this.treeGrid.CellRenderers.Remove("Hyperlink");
this.treeGrid.CellRenderers.Add("Hyperlink", new TreeGridCellHyperlinkRendererExt());
public class TreeGridCellHyperlinkRendererExt : TreeGridCellHyperlinkRenderer
{
public override void OnInitializeEditElement(DataColumnBase dataColumn, HyperlinkButton uiElement, object dataContext)
{
base.OnInitializeEditElement(dataColumn, uiElement, dataContext);
uiElement.Foreground = new SolidColorBrush(Colors.Red);
}
}
Constructors
TreeGridCellHyperlinkRenderer()
Initializes a new instance of the TreeGridCellHyperlinkRenderer class.
Declaration
public TreeGridCellHyperlinkRenderer()
Methods
InitializeCellStyle(TreeDataColumnBase, Object)
Initializes the custom style for cell when the corresponding API's and Selectors are used.
Declaration
protected override void InitializeCellStyle(TreeDataColumnBase dataColumn, object record)
Parameters
| Type | Name | Description |
|---|---|---|
| TreeDataColumnBase | dataColumn | The corresponding DataColumn Which holds TreeGridColumn, RowColumnIndex and GridCell to initialize cell style. |
| System.Object | record | The corresponding record to initialize cell style. |
Overrides
OnCreateEditUIElement()
Creates a new uielement for the edit mode of cell.
Declaration
protected override HyperlinkButton OnCreateEditUIElement()
Returns
| Type | Description |
|---|---|
| Microsoft.UI.Xaml.Controls.HyperlinkButton | The new uielement for the edit mode of cell. |
Overrides
OnInitializeEditElement(TreeDataColumnBase, HyperlinkButton, Object)
Method which is used to initialize the renderer element bindings with corresponding column values.
Declaration
public override void OnInitializeEditElement(TreeDataColumnBase dataColumn, HyperlinkButton uiElement, object dataContext)
Parameters
| Type | Name | Description |
|---|---|---|
| TreeDataColumnBase | dataColumn | Specifies the corresponding TreeDataColumnBase. |
| Microsoft.UI.Xaml.Controls.HyperlinkButton | uiElement | Specifies the corresponding renderer element. |
| System.Object | dataContext | Specifies the data context of the cell. |
Overrides
OnUnwireEditUIElement(HyperlinkButton)
Unwires the events associated with edit UIElement
Declaration
protected override void OnUnwireEditUIElement(HyperlinkButton uiElement)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.UI.Xaml.Controls.HyperlinkButton | uiElement | The corresponding UIElement. |
Overrides
OnWireEditUIElement(HyperlinkButton)
Wires the events associated with edit UIElement.
Declaration
protected override void OnWireEditUIElement(HyperlinkButton uiElement)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.UI.Xaml.Controls.HyperlinkButton | uiElement | The corresponding edit UIElement to wire its events. |
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 | The Microsoft.UI.Xaml.Input.KeyRoutedEventArgs contains the event data. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if handled by SfDataGrid; false if handled by editor of the column. |