PaletteItem
Represents a diagram element template in the palette.
Implementiert: INotifyPropertyChanged, IDisposable
Konstruktoren
public PaletteItem()
paletteItem = PaletteItem()
Initializes an empty item for programmatic palette composition.
protected internal PaletteItem(DiagramElement template)
paletteItem = PaletteItem(template)
Initializes an item for a registry template.
- template
- The registry template.
Eigenschaften
public string Category { get; set; }
value = paletteItem.Category
paletteItem.Category = value
Gets or sets the category name.
public virtual string Description { get; set; }
value = paletteItem.Description
paletteItem.Description = value
Gets or sets the tooltip description.
public DiagramElement Element { get; }
value = paletteItem.Element
Gets the WPF-compatible diagram element represented by this item.
public Func<CancellationToken, ValueTask<object>> Factory { get; set; }
value = paletteItem.Factory
paletteItem.Factory = value
Gets or sets a compatibility factory for manually supplied items.
public string IconName { get; }
value = paletteItem.IconName
Gets the shared StockSharp SVG icon key.
public string IconSource { get; set; }
value = paletteItem.IconSource
paletteItem.IconSource = value
Gets or sets a compatibility icon key for manually supplied items.
public Guid Id { get; protected internal set; }
value = paletteItem.Id
paletteItem.Id = value
Gets the stable item identifier.
public bool IsExpanded { get; set; }
value = paletteItem.IsExpanded
paletteItem.IsExpanded = value
Gets or sets whether a category row is expanded.
public virtual string Name { get; set; }
value = paletteItem.Name
paletteItem.Name = value
Gets or sets the display name for a manually supplied item.
public Guid ParentId { get; protected internal set; }
value = paletteItem.ParentId
paletteItem.ParentId = value
Gets the parent category identifier.
public DiagramElement Template { get; private set; }
value = paletteItem.Template
paletteItem.Template = value
Gets the registry template represented by this item.
public string TypeName { get; set; }
value = paletteItem.TypeName
paletteItem.TypeName = value
Gets or sets a compatibility element type name.
Methoden
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
Rückgabe: New element instance, or when the item cannot create one.
public void Dispose()
paletteItem.Dispose()
Disposes of items in the pool that implement IDisposable.
public override string ToString()
result = paletteItem.ToString()
Returns a string representation of the tuple, with values separated by commas.
Rückgabe: A string representing the tuple's values.
Ereignisse
public event PropertyChangedEventHandler PropertyChanged
paletteItem.PropertyChanged += handler
Occurs when a display property changes.