Class GridStyle
- Namespace
- Myra.Graphics2D.UI.Styles
- Assembly
- Myra.dll
Style class that defines the visual appearance and behavior of grid widgets.
public class GridStyle : WidgetStyle
- Inheritance
-
GridStyle
- Derived
- Inherited Members
Constructors
GridStyle()
Initializes a new instance of the GridStyle class.
public GridStyle()
GridStyle(GridStyle)
Initializes a new instance of the GridStyle class by copying properties from another style.
public GridStyle(GridStyle style)
Parameters
styleGridStyleThe source grid style to copy from.
Properties
CanSelectNothing
Gets or sets a value indicating whether nothing can be selected by clicking an already-selected item.
public bool CanSelectNothing { get; set; }
Property Value
ColumnSpacing
Gets or sets the spacing in pixels between grid columns.
public int ColumnSpacing { get; set; }
Property Value
GridLinesColor
Gets or sets the color of the grid lines when displayed.
public Color GridLinesColor { get; set; }
Property Value
- Color
GridSelectionMode
Gets or sets the selection mode for the grid (rows, columns, cells, or none).
public GridSelectionMode GridSelectionMode { get; set; }
Property Value
HoverIndexCanBeNull
Gets or sets a value indicating whether the hover index can be null when the mouse is outside the grid.
public bool HoverIndexCanBeNull { get; set; }
Property Value
RowSpacing
Gets or sets the spacing in pixels between grid rows.
public int RowSpacing { get; set; }
Property Value
SelectionBackground
Gets or sets the brush used to draw the background of selected rows, columns, or cells.
public IBrush SelectionBackground { get; set; }
Property Value
SelectionHoverBackground
Gets or sets the brush used to draw the background of rows, columns, or cells being hovered over.
public IBrush SelectionHoverBackground { get; set; }
Property Value
ShowGridLines
Gets or sets a value indicating whether grid lines are displayed for debugging purposes.
public bool ShowGridLines { get; set; }
Property Value
Methods
Clone()
Creates a deep copy of this grid style.
public override WidgetStyle Clone()
Returns
- WidgetStyle
A new GridStyle instance with the same properties.