[Handler(GridColumn.IHandler)] [ContentProperty("DataCell")] public class GridColumn : Widget
Grid column definition for a Grid

Properties

AutoSize

#
public bool AutoSize { get; set; }
Gets or sets a value indicating whether this column will auto size to the content of the grid.
Remarks: This usually will only auto size based on the visible content to be as performant as possible.
true to auto size the column; otherwise, false.

CellToolTipBinding

#
public IIndirectBinding<string> CellToolTipBinding { get; set; }
Gets or sets the binding to use to get the tooltip for each cell in this column.

ControlObject

public object ControlObject { get; }
Gets the instance of the platform-specific object
inherited fromWidget
Remarks: This can sometimes be useful to get the platform-specific object. Some handlers may not have any backing object for its functionality, so this may be null. It is more preferred to use the Widget.Handler and cast that to the platform-specific handler class which can give you additional methods and helpers to do common tasks. For example, the Application object's handler for OS X has a AddFullScreenMenuItem property to specify if you want full screen support in your app.

DataCell

#
public Cell DataCell { get; set; }
Gets or sets the cell for the content of the column.

DisplayIndex

#
[DefaultValue(-1)] public int DisplayIndex { get; set; }
Gets or sets the index of the column in display order, or -1 to use the order they are added.
Remarks: This value must be within the range of the total number of columns that are added.

Editable

#
public bool Editable { get; set; }
Gets or sets a value indicating whether the user can edit the contents of the cells, if the DataCell allows it.

Expand

#
public bool Expand { get; set; }
Gets or sets a value indicating whether this column should expand to fill the available space in the Grid
Remarks: If more than one column has this set, they will share the space evenly.
true to expand the column; otherwise, false

Handler

public object Handler { get; }
Gets the platform-specific handler for this widget
inherited fromWidget

HeaderText

#
public string HeaderText { get; set; }
Gets or sets the text to display in the header of the column.

HeaderTextAlignment

#
public TextAlignment HeaderTextAlignment { get; set; }
Gets or sets a value to specify the header text alignment for this column

HeaderToolTip

#
public string HeaderToolTip { get; set; }
Gets or sets the tooltip to display when the user moves the cursor over the header of this column.

IsDisposed

public bool IsDisposed { get; }
Gets or sets a value indicating whether this Widget has been disposed.
inherited fromWidget
Remarks: When the widget is disposed, it can no longer be used.
true if this instance has been disposed; otherwise, false.

MaxWidth

#
public int MaxWidth { get; set; }
Gets or sets the maximum width for the column

MinWidth

#
public int MinWidth { get; set; }
Gets or sets the minimum width for the column

NativeHandle

public nint NativeHandle { get; }
Gets the native platform-specific handle for integration purposes
inherited fromWidget

Platform

public Platform Platform { get; }
Gets the platform that was used to create the Widget.Handler for this widget
inherited fromWidget
Remarks: This gets set to the current Platform.Instance during the construction of the object

Properties

public PropertyStore Properties { get; }
Gets the dictionary of properties for this widget
inherited fromWidget

Resizable

#
public bool Resizable { get; set; }
Gets or sets a value indicating whether the column is resizable by the user.

Sortable

#
public bool Sortable { get; set; }
Gets or sets a value indicating whether the user can click on the header.

Style

public string Style { get; set; }
Gets or sets the style of this widget
inherited fromWidget
Remarks: Styles allow you to attach custom platform-specific logic to a widget. In your platform-specific assembly, use Add{H} to add the style logic with the same id.
// in your UI
var control = new Button { Style = "mystyle" };

// in your platform assembly
using Eto.Mac.Forms.Controls;

Styles.AddHandler<ButtonHandler>("mystyle", handler => {
	// this is where you can use handler.Control to set properties, handle events, etc.
	handler.Control.BezelStyle = NSBezelStyle.SmallSquare;
});

Visible

#
public bool Visible { get; set; }
Gets or sets a value indicating whether this column is visible.

Width

#
public int Width { get; set; }
Gets or sets the initial width of the column.

Methods

Dispose

protected virtual void Dispose(bool disposing)
Handles the disposal of this widget
inherited fromWidget
disposing (bool)True if the caller called Widget.Dispose() manually, false if being called from a finalizer

GetCallback

protected virtual object GetCallback()
Gets an instance of an object used to perform callbacks to the widget from handler implementations
inherited fromWidget
Remarks: The callback should implement the parent class' Widget.ICallback interface so that there only needs to be a single callback for the entire hierarchy. This should return a static instance to avoid having overhead for each instance of your control.
The callback instance to use for this widget

Initialize

protected void Initialize()
Initializes the widget handler
inherited fromWidget
Remarks: This is typically called from the constructor after all of the logic is completed to construct the object. If your handler interface has the AutoInitializeAttribute set to false, then you are responsible for calling this method in your constructor after calling the creation method on your custom handler.

OnStyleChanged

protected virtual void OnStyleChanged(EventArgs e)
Handles when the Widget.Style is changed.
inherited fromWidget

ToString

public override string ToString()
Gets a string that represents the current object with its ID if specified.
inherited fromWidget
A string value indicating the type and ID (if specified) of this widget.
Object.ToString

Events