Table of Contents

Class DataGridImageColumn

Namespace
Myra.Graphics2D.UI.Data
Assembly
Myra.dll

A DataGrid column that displays image values (IImage) as thumbnail images. Supports neither filtering nor sorting.

public class DataGridImageColumn : DataGridColumnBase
Inheritance
DataGridImageColumn
Inherited Members

Constructors

DataGridImageColumn(string, int)

Initializes a new instance of the DataGridImageColumn class with the specified property and width, using the property name as the header text.

public DataGridImageColumn(string property, int width = 100)

Parameters

property string

The name of the property on the data object to bind to.

width int

The width of the column in pixels.

DataGridImageColumn(string, string, int)

Initializes a new instance of the DataGridImageColumn class with the specified property, header, and width.

public DataGridImageColumn(string property, string header, int width = 100)

Parameters

property string

The name of the property on the data object to bind to.

header string

The text displayed in the column header.

width int

The width of the column in pixels.

Properties

Flags

Gets the DataGridColumnFlags describing which capabilities this column type supports.

public override DataGridColumnFlags Flags { get; }

Property Value

DataGridColumnFlags

ImageHeight

Gets or sets the height of the rendered image thumbnail in pixels. Defaults to 32.

public int ImageHeight { get; set; }

Property Value

int

ImageWidth

Gets or sets the width of the rendered image thumbnail in pixels. Defaults to 32.

public int ImageWidth { get; set; }

Property Value

int

Methods

CreateWidget(object, DataGridStyle)

Creates the widget used to display the cell value. The DataGridStyle is provided so the column can apply the appropriate cell style.

public override Widget CreateWidget(object value, DataGridStyle style)

Parameters

value object

The bound property value of the cell.

style DataGridStyle

The active DataGrid style.

Returns

Widget

The widget to display, or null for an empty cell.