PaletteItem

StockSharp.Xaml.Diagram.Controls

Represents a diagram element template in the palette.

Реализует: INotifyPropertyChanged, IDisposable

Конструкторы

PaletteItem
public PaletteItem()
paletteItem = PaletteItem()

Initializes an empty item for programmatic palette composition.

PaletteItem
protected internal PaletteItem(DiagramElement template)
paletteItem = PaletteItem(template)

Initializes an item for a registry template.

template
The registry template.

Свойства

Category
public string Category { get; set; }
value = paletteItem.Category
paletteItem.Category = value

Gets or sets the category name.

Description
public virtual string Description { get; set; }
value = paletteItem.Description
paletteItem.Description = value

Gets or sets the tooltip description.

Element
public DiagramElement Element { get; }
value = paletteItem.Element

Gets the WPF-compatible diagram element represented by this item.

Factory
public Func<CancellationToken, ValueTask<object>> Factory { get; set; }
value = paletteItem.Factory
paletteItem.Factory = value

Gets or sets a compatibility factory for manually supplied items.

IconName
public string IconName { get; }
value = paletteItem.IconName

Gets the shared StockSharp SVG icon key.

IconSource
public string IconSource { get; set; }
value = paletteItem.IconSource
paletteItem.IconSource = value

Gets or sets a compatibility icon key for manually supplied items.

Id
public Guid Id { get; protected internal set; }
value = paletteItem.Id
paletteItem.Id = value

Gets the stable item identifier.

IsExpanded
public bool IsExpanded { get; set; }
value = paletteItem.IsExpanded
paletteItem.IsExpanded = value

Gets or sets whether a category row is expanded.

Name
public virtual string Name { get; set; }
value = paletteItem.Name
paletteItem.Name = value

Gets or sets the display name for a manually supplied item.

ParentId
public Guid ParentId { get; protected internal set; }
value = paletteItem.ParentId
paletteItem.ParentId = value

Gets the parent category identifier.

Template
public DiagramElement Template { get; private set; }
value = paletteItem.Template
paletteItem.Template = value

Gets the registry template represented by this item.

TypeId
public Guid TypeId { get; }
value = paletteItem.TypeId

Gets the element type identifier.

TypeName
public string TypeName { get; set; }
value = paletteItem.TypeName
paletteItem.TypeName = value

Gets or sets a compatibility element type name.

Методы

CreateElementAsync
public Task<DiagramElement> CreateElementAsync(ICompositionModel model, CancellationToken cancellationToken)
result = paletteItem.CreateElementAsync(model, cancellationToken)

Clones the registry template and applies the WPF-compatible identifier and repeated-name rules.

model
Target model used to calculate a repeated-name suffix.
cancellationToken
CancellationToken

Возвращает: New element instance, or when the item cannot create one.

Dispose
public void Dispose()
paletteItem.Dispose()

Disposes of items in the pool that implement IDisposable.

ToString
public override string ToString()
result = paletteItem.ToString()

Returns a string representation of the tuple, with values separated by commas.

Возвращает: A string representing the tuple's values.

События

PropertyChanged
public event PropertyChangedEventHandler PropertyChanged
paletteItem.PropertyChanged += handler

Occurs when a display property changes.