DiagramPaletteControl
Displays a searchable, categorized, live registry of diagram element templates.
Erbt von: UserControl
Implementiert: IDisposable
Konstruktoren
public DiagramPaletteControl()
diagramPaletteControl = DiagramPaletteControl()
Initializes a new instance of the DiagramPaletteControl class.
Eigenschaften
public ObservableCollection<Guid> ExcludedTypeIds { get; }
value = diagramPaletteControl.ExcludedTypeIds
Gets type identifiers excluded from the palette.
public ICommand HelpCommand { get; set; }
value = diagramPaletteControl.HelpCommand
diagramPaletteControl.HelpCommand = value
Gets or sets the command used by the palette Help menu item.
public bool IsSearchMode { get; private set; }
value = diagramPaletteControl.IsSearchMode
diagramPaletteControl.IsSearchMode = value
Gets whether the palette is displaying search results.
public IEnumerable<PaletteItem> Items { get; }
value = diagramPaletteControl.Items
Gets every visible registry item.
public DiagramPaletteModel Model { get; set; }
value = diagramPaletteControl.Model
diagramPaletteControl.Model = value
Gets or sets the WPF-compatible live palette model.
public DiagramElement PaletteElement { get; }
value = diagramPaletteControl.PaletteElement
Gets the currently selected registry template.
public ICompositionRegistry Registry { get; set; }
value = diagramPaletteControl.Registry
diagramPaletteControl.Registry = value
Gets or sets the live composition registry.
Methoden
public void AddCategory(string categoryName, IEnumerable<PaletteItem> items)
diagramPaletteControl.AddCategory(categoryName, items)
Adds a compatibility category not backed by Registry.
- categoryName
- Category name.
- items
- Items.
public void Dispose()
diagramPaletteControl.Dispose()
Disposes of items in the pool that implement IDisposable.
protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e)
diagramPaletteControl.OnAttachedToVisualTree(e)
protected override void OnDetachedFromVisualTree(VisualTreeAttachmentEventArgs e)
diagramPaletteControl.OnDetachedFromVisualTree(e)
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
diagramPaletteControl.OnPropertyChanged(change)
Ereignisse
public event EventHandler<PaletteDragEventArgs> DragStarted
diagramPaletteControl.DragStarted += handler
Occurs when a drag operation starts from a leaf item.
public event EventHandler<DiagramElement> HelpRequested
diagramPaletteControl.HelpRequested += handler
Occurs when the default Help command is invoked.
public event EventHandler<PaletteItem> ItemActivated
diagramPaletteControl.ItemActivated += handler
Occurs when an item is double-clicked or activated with Enter.
public event EventHandler<DiagramOperationFailedEventArgs> OperationFailed
diagramPaletteControl.OperationFailed += handler
Occurs when a diagram operation cannot complete its platform-side work.
public event EventHandler<PaletteElementEventArgs> PaletteElementDoubleClicked
diagramPaletteControl.PaletteElementDoubleClicked += handler
Occurs when a registry template is double-clicked, before the item is put on the canvas: a host that opens what the template stands for marks it handled, and the item is not put.
Felder
public static readonly StyledProperty<ICommand> HelpCommandProperty
value = DiagramPaletteControl.HelpCommandProperty
Identifies the HelpCommand styled property.
public static readonly StyledProperty<bool> IsSearchModeProperty
value = DiagramPaletteControl.IsSearchModeProperty
Identifies the IsSearchMode styled property.
public const string ListName
value = DiagramPaletteControl.ListName
The name of the list of elements, by which automation finds it.
public static readonly StyledProperty<DiagramPaletteModel> ModelProperty
value = DiagramPaletteControl.ModelProperty
Identifies the Model styled property.
public static readonly StyledProperty<ICompositionRegistry> RegistryProperty
value = DiagramPaletteControl.RegistryProperty
Identifies the Registry styled property.
public const string SearchBoxName
value = DiagramPaletteControl.SearchBoxName
The name of the search box, by which automation finds it.