Class GridCellImageRenderer
Represents the class that maintains the rendering of GridImageColumn.
Inheritance
System.Object
GridCellImageRenderer
Inherited Members
GridCellRendererBase.RaiseCurrentCellValidatingEvent(SfDataGrid, GridColumn, Object, Object, Object)
Namespace: Syncfusion.UI.Xaml.Grid.Cells
Assembly: Syncfusion.SfGrid.WPF.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. |
System.Windows.Controls.Image | uiElement | Specifies the corresponding renderer element. |
System.Object | dataContext | Specifies the data context of the cell. |
Overrides
Syncfusion.UI.Xaml.Grid.Cells.GridVirtualizingCellRenderer<System.Windows.Controls.Image, System.Windows.Controls.Image>.OnInitializeEditElement(Syncfusion.UI.Xaml.Grid.DataColumnBase, System.Windows.Controls.Image, System.Object)
OnRenderContent(DrawingContext, Rect, Geometry, DataColumnBase, GridCell, Object)
Declaration
protected override void OnRenderContent(DrawingContext dc, Rect cellRect, Geometry clipGeometry, DataColumnBase dataColumnBase, GridCell gridCell, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Media.DrawingContext | dc | |
System.Windows.Rect | cellRect | |
System.Windows.Media.Geometry | clipGeometry | |
DataColumnBase | dataColumnBase | |
GridCell | gridCell | |
System.Object | dataContext |
Overrides
Syncfusion.UI.Xaml.Grid.Cells.GridVirtualizingCellRendererBase<System.Windows.Controls.Image, System.Windows.Controls.Image>.OnRenderContent(System.Windows.Media.DrawingContext, System.Windows.Rect, System.Windows.Media.Geometry, Syncfusion.UI.Xaml.Grid.DataColumnBase, Syncfusion.UI.Xaml.Grid.GridCell, System.Object)
Implements
System.IDisposable