DiagramPaletteSource

StockSharp.Xaml.Diagram.Controls

Maintains the palette projection of a live composition registry.

实现: IDisposable

构造函数

DiagramPaletteSource
public DiagramPaletteSource()
diagramPaletteSource = DiagramPaletteSource()

Initializes a new instance of the DiagramPaletteSource class.

属性

Categories
public ReadOnlyObservableCollection<PaletteCategory> Categories { get; }
value = diagramPaletteSource.Categories

Gets categorized palette items.

ExcludedTypeIds
public ObservableCollection<Guid> ExcludedTypeIds { get; }
value = diagramPaletteSource.ExcludedTypeIds

Gets type identifiers excluded from the palette.

Items
public ReadOnlyObservableCollection<PaletteItem> Items { get; }
value = diagramPaletteSource.Items

Gets all leaf items.

Model
public DiagramPaletteModel Model { get; set; }
value = diagramPaletteSource.Model
diagramPaletteSource.Model = value

Gets or sets the WPF-compatible live palette model.

Registry
public ICompositionRegistry Registry { get; set; }
value = diagramPaletteSource.Registry
diagramPaletteSource.Registry = value

Gets or sets the live composition registry.

方法

AddCategory
public void AddCategory(string categoryName, IEnumerable<PaletteItem> items)
diagramPaletteSource.AddCategory(categoryName, items)

Adds a compatibility category not backed by the registry.

categoryName
Category name.
items
Items.
Clear
public void Clear()
diagramPaletteSource.Clear()

Removes registry and compatibility items.

Dispose
public void Dispose()
diagramPaletteSource.Dispose()

Disposes of items in the pool that implement IDisposable.

Filter
public IReadOnlyList<PaletteItem> Filter(string text)
result = diagramPaletteSource.Filter(text)

Returns items matching their localized name, description, or category.

text
Search text.

返回值: Matching items.

Refresh
public void Refresh()
diagramPaletteSource.Refresh()

Rebuilds the sorted category projection.

ResumeLanguageNotifications
internal void ResumeLanguageNotifications()
diagramPaletteSource.ResumeLanguageNotifications()

Resumes language-driven rebuilding without forcing an additional refresh.

SuspendLanguageNotifications
internal void SuspendLanguageNotifications()
diagramPaletteSource.SuspendLanguageNotifications()

Stops language-driven rebuilding while an owning visual is detached.

UpdatePublishers
internal void UpdatePublishers(ICompositionRegistry registry, DiagramPaletteModel model)
diagramPaletteSource.UpdatePublishers(registry, model)

Atomically replaces the external publishers and rebuilds their projection once.