Class GridImageColumn
Represents a SfDataGrid column that hosts SfImageView in its cells.
Implements
Inherited Members
Namespace: Syncfusion.SfDataGrid.XForms
Assembly: Syncfusion.SfDataGrid.XForms.dll
Syntax
public class GridImageColumn : GridColumn, IDisposable
Remarks
Use GridImageColumn to display columns of ImageSource data as a SfImageView.
To create a column, add it to the Columns collection and to populate the data
to the column set the MappingName to the property in the data source.
dataGrid.Columns.Add(new GridSwitchColumn() { MappingName = "DealerImage" });
.
The data can also be populated to the column by using the DisplayBinding property. The Binding property is applied to the SfImageView view created in the column. The Xamarin.Forms.BindableObject.BindingContext for the view in each cell is the data item for the row the cell is present. Therefore, to set up the binding you only have to set the Xamarin.Forms.Binding.Path. Optionally, you can specify a Xamarin.Forms.Binding.Converter if you want to convert the data.
Constructors
GridImageColumn()
Initializes a new instance of the GridImageColumn class.
Declaration
public GridImageColumn()
Fields
AspectProperty
Identifies the Aspect Xamarin.Forms.BindableProperty.
Declaration
public static readonly BindableProperty AspectProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Remarks
This Xamarin.Forms.BindableProperty is read-only.
Properties
Aspect
Gets or sets the aspect of the image loaded in the ImageView of the GridImageColumn.
GridImageColumn imageColumn;
imageColumn = new GridImageColumn();
imageColumn.MappingName = "DealerImage";
imageColumn.Aspect = Aspect.AspectFit;
dataGrid.Columns.Add(imageColumn);
Declaration
public Aspect Aspect { get; set; }
Property Value
Type |
---|
Xamarin.Forms.Aspect |