Skip to main content
Version: 4.2

CommandCollection

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.2.0.0)

Owns ordered commands and observes their property changes.

public class CommandCollection : Collection<PaletteCommand>

A command belongs to one collection. Removing it releases ownership.

Example:

palette.Commands.Add(new PaletteCommand { Text = "Account" });
palette.Commands.Add(new PaletteCommand { Text = "Review" });
palette.Show();

Constructors​

Instance member CommandCollection()​

Initializes a new instance of CommandCollection.

Methods​

Protected member ClearItems()​

Releases all commands and clears the collection.

Protected member InsertItem(index, item)​

Inserts and observes a command.

ParameterTypeDescription
indexInt32Insertion index.
itemPaletteCommandAn unowned command.

Protected member RemoveItem(index)​

Removes a command and releases ownership.

ParameterTypeDescription
indexInt32Removal index.

Protected member SetItem(index, item)​

Replaces a command and transfers observation.

ParameterTypeDescription
indexInt32Replacement index.
itemPaletteCommandAn unowned command.