Class ToolboxItem
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
DisplayNamestringThe name the toolbox shows.
CategorystringThe group the toolbox lists it under.
SnippetstringThe 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
DisplayName
The name the toolbox shows.
public string DisplayName { get; init; }
Property Value
Snippet
The markup inserted, a single element such as <Button>Button</Button>.
public string Snippet { get; init; }
Property Value
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
configurationIcyConfigurationThe 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
configurationis null.