Class GridCellImageRenderer
Represents the class that maintains the rendering of GridImageColumn.
Inheritance
System.Object
GridVirtualizingCellRendererBase<Microsoft.UI.Xaml.Controls.Image, Microsoft.UI.Xaml.Controls.Image>
GridCellImageRenderer
Inherited Members
Namespace: Syncfusion.UI.Xaml.DataGrid.Renderers
Assembly: Syncfusion.Grid.WinUI.dll
Syntax
public class GridCellImageRenderer : GridVirtualizingCellRenderer<Image, Image>, IGridCellRenderer, IDisposable
Examples
this.sfDataGrid.CellRenderers.Remove("Image");
this.sfDataGrid.CellRenderers.Add("Image", new GridCellImageRendererExt());
public class GridCellImageRendererExt : GridCellImageRenderer
{
public override void OnInitializeEditElement(DataColumnBase dataColumn, Image uiElement, object dataContext)
{
base.OnInitializeEditElement(dataColumn, uiElement, dataContext);
uiElement.Stretch = Stretch.UniformToFill;
}
}
Constructors
GridCellImageRenderer()
Initializes a new instance of the GridCellImageRenderer class.
Declaration
public GridCellImageRenderer()
Methods
OnInitializeEditElement(DataColumnBase, Image, Object)
Method which is used to initialize the renderer element bindings with corresponding column values.
Declaration
public override void OnInitializeEditElement(DataColumnBase dataColumn, Image uiElement, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | Specifies the corresponding DataColumnBase. |
Microsoft.UI.Xaml.Controls.Image | uiElement | Specifies the corresponding renderer element. |
System.Object | dataContext | Specifies the data context of the cell. |
Overrides
Syncfusion.UI.Xaml.DataGrid.Renderers.GridVirtualizingCellRenderer<Microsoft.UI.Xaml.Controls.Image, Microsoft.UI.Xaml.Controls.Image>.OnInitializeEditElement(Syncfusion.UI.Xaml.DataGrid.DataColumnBase, Microsoft.UI.Xaml.Controls.Image, System.Object)
Implements
System.IDisposable