PaletteViewModel

StockSharp.Xaml.Diagram.Maui

ViewModel for the element palette.

继承自: NotifiableObject

属性

ActivateItemCommand : DelegateCommand<PaletteItem>

Gets the command wrapping PaletteItem).

AllItems : ObservableCollection<PaletteItem>

Flat list of all items for search.

Categories : ObservableCollection<PaletteCategory>

All categories with their items.

ClearCommand : DelegateCommand

Gets the command wrapping Clear.

ClearSearchCommand : DelegateCommand

Gets the command wrapping ClearSearch.

FilteredItems : ObservableCollection<PaletteItem>

Filtered items based on search.

IsSearchMode : bool

Gets or sets the IsSearchMode observable property.

SearchText : string

Gets or sets the SearchText observable property.

SelectedItem : PaletteItem

Gets or sets the SelectedItem observable property.

方法

ActivateItem(PaletteItem)

Activate the selected item.

AddCategory(string, IEnumerable<PaletteItem>)

Add a category with items.

Clear()

Clear all categories and items.

ClearSearch()

Clear search text.

StartDrag(PaletteItem, float, float)

Start dragging an item from the palette.

事件

DragStarted : EventHandler<PaletteDragEventArgs>

Occurs when a drag operation starts from the palette.

ItemActivated : EventHandler<PaletteItem>

Occurs when an item is selected for drag or double-click creation.