Table of Contents

Class ToolboxPanel

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

Lists elements to insert into the page an EditorSession edits.

public class ToolboxPanel : ContentControl, INotifyPropertyChanging, IBindingTarget, INotifyPropertyChanged, INotifyFocusChanged, IContainerLayout
Inheritance
ToolboxPanel
Implements
Inherited Members
Extension Methods

Remarks

Items starts with the built-in controls (CreateDefaults(IcyConfiguration)) once a session is set. Add your game's own controls to it; a game control's snippet uses whatever prefix the page declares for it.

Clicking an item calls Insert(ToolboxItem): into the selected element when it's a container (a Panel, or a ContentControl with no content yet), otherwise right after it. The new element is then selected. Dragging an item onto the page isn't supported yet.

Constructors

ToolboxPanel()

Initializes a new instance of the ToolboxPanel class.

public ToolboxPanel()

Properties

Items

Gets the elements the toolbox offers, in display order.

public ObservableCollection<ToolboxItem> Items { get; }

Property Value

ObservableCollection<ToolboxItem>

Session

Gets or sets the session to insert into, or null.

public EditorSession? Session { get; set; }

Property Value

EditorSession

Remarks

Setting a session while Items is empty fills it with the built-in controls.

StatusText

Gets the status line: why the last insertion failed, or empty.

public string StatusText { get; }

Property Value

string

Methods

Insert(ToolboxItem)

Inserts item's snippet relative to the session's selection, and selects the new element.

public EditResult Insert(ToolboxItem item)

Parameters

item ToolboxItem

The item to insert.

Returns

EditResult

The edit's result; a failure when nothing is selected or the snippet doesn't fit there.

Exceptions

ArgumentNullException

item is null.