Table of Contents

Class ToolboxItem

Namespace
Icy.Design.Editor.Panels
Assembly
IcyUI.Design.dll

An element a ToolboxPanel can insert.

public sealed record ToolboxItem : IEquatable<ToolboxItem>
Inheritance
ToolboxItem
Implements
Inherited Members
Extension Methods

Constructors

ToolboxItem(string, string, string)

An element a ToolboxPanel can insert.

public ToolboxItem(string DisplayName, string Category, string Snippet)

Parameters

DisplayName string

The name the toolbox shows.

Category string

The group the toolbox lists it under.

Snippet string

The markup inserted, a single element such as <Button>Button</Button>.

Properties

Category

The group the toolbox lists it under.

public string Category { get; init; }

Property Value

string

DisplayName

The name the toolbox shows.

public string DisplayName { get; init; }

Property Value

string

Snippet

The markup inserted, a single element such as <Button>Button</Button>.

public string Snippet { get; init; }

Property Value

string

Methods

CreateDefaults(IcyConfiguration)

Lists every built-in element a page can contain: each public, non-abstract UIElement with a parameterless constructor in one of the configuration's built-in markup namespaces.

public static IReadOnlyList<ToolboxItem> CreateDefaults(IcyConfiguration configuration)

Parameters

configuration IcyConfiguration

The configuration whose BuiltInNamespaces to use.

Returns

IReadOnlyList<ToolboxItem>

The items, sorted by category and name. Most snippets are a bare element (<Slider/>); buttons, text and borders get a minimal content or size so they're visible once inserted.

Exceptions

ArgumentNullException

configuration is null.