CustomPalette

References
public sealed class CustomPalette
Provides a system-wide square grid of colours the user is allowed to specify.

Constructors

CustomPalette

#
public CustomPalette()
Create a new custom palette, populated with the system-wise settings.

CustomPalette

#
public CustomPalette(int rows, int columns, IEnumerable<CustomPaletteEntry> entries)
Create a custom palette.
rows (int)Number of rows.
columns (int)Number of columns.
entries (IEnumerable<CustomPaletteEntry>)Initial entries.

Properties

Bounds

#
public RectangleF Bounds { get; }
Gets the bounds of this palette. This field gets assigned during drawing operations.

Columns

#
public int Columns { get; }
Gets the number of columns in this palette.

DefaultEntries

#
public static IEnumerable<CustomPaletteEntry> DefaultEntries { get; }
Gets the default entries.

DefaultSize

#
public static int DefaultSize { get; }
Gets the default width and height for custom palettes.

Rows

#
public int Rows { get; }
Gets the number of rows in this palette.

SpecifiedEntries

#
public IEnumerable<CustomPaletteEntry> SpecifiedEntries { get; }
Enumerate over all specified entries.

Indexers

this[]

#
public CustomPaletteEntry this[int row, int column] { get; }
Gets the entry at the specified row and column.
row (int)Row index.
column (int)Column index.
The entry and the specified row and column.

Methods

Draw

#
public void Draw(Context context, RectangleF bounds)
Draw this palette into a rectangle.
context (Context)Graphics context.
bounds (RectangleF)Bounds which contains the palette.

EntryAt

#
public CustomPaletteEntry EntryAt(PointF point, out RectangleF entryBounds)
Gets the entry underneath the given point.
point (PointF)Point.
entryBounds (out RectangleF)Gets the box for the found entry.
Entry underneath point.

EntryAt

#
public CustomPaletteEntry EntryAt(PointF point)
Gets the entry underneath the given point.
point (PointF)Point.
Entry underneath point.

PaletteIcon

#
public static IIcon PaletteIcon()
Gets the icon for the custom palette.
Icon.