Class PaletteGroupBar
Displays a collection of symbol palettes that the symbol models contain in a GroupBar control.
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Diagram.Controls
Assembly: Syncfusion.Diagram.Windows.dll
Syntax
public class PaletteGroupBar : GroupBar, IThemeProvider, IDisposable, IVisualStyle, ICancelModeProvider, ISplitterPaneSupport, IScrollBarWrapperContainer, ISupportUpdating, ISupportIntelliMouse, IQueryFocusInside, INonClientPaintingSupport, IIntegratedScrollContainer, IGroupBarDesignerInvoke, ISupportInitialize
Remarks
This class is derived from Syncfusion.Windows.Forms.Tools.GroupBar and provides an implementation for displaying symbol palettes and the symbol models they contain. Each symbol palette corresponds to a single panel (i.e. GroupView) inside of the GroupBar. Each entry in a panel corresponds to a symbol model inside of a symbol palette.
The user interface looks and behaves like an Outlook bar. Each symbol palette is a list of symbols that have an icon and a label. If the EditMode flag is False, the PaletteGroupBar allows symbols to be dragged from this control onto diagrams.
PaletteGroupViewConstructors
PaletteGroupBar()
Initializes a new instance of the PaletteGroupBar class.
Declaration
public PaletteGroupBar()
PaletteGroupBar(IContainer)
Initializes a new instance of the PaletteGroupBar class.
Declaration
public PaletteGroupBar(IContainer container)
Parameters
Type | Name | Description |
---|---|---|
System.ComponentModel.IContainer | container | The container. |
Properties
CurrentSymbolPalette
Gets the currently selected symbol palette.
Declaration
public SymbolPalette CurrentSymbolPalette { get; }
Property Value
Type |
---|
SymbolPalette |
Diagram
Gets or sets the diagram control.
Declaration
public Diagram Diagram { get; set; }
Property Value
Type |
---|
Diagram |
DragNodeCueEnabled
Gets or sets a value indicating whether dragged node cue is enabled or not
Declaration
public bool DragNodeCueEnabled { get; set; }
Property Value
Type |
---|
System.Boolean |
EditMode
Gets or sets a value indicating whether or not the symbols can be dragged from the palette onto a diagram.
Declaration
public bool EditMode { get; set; }
Property Value
Type |
---|
System.Boolean |
Remarks
When this property is set to True, the palette is being edited and symbols cannot be dragged onto a diagram. The Symbol Designer sets this flag to True. The typical setting for an application is False, which means that the palette is not being edited and symbols may be dragged onto a diagram.
Magnification
Gets or sets drag cue's magnification (zoom) values on a scale of 1 to n.
Declaration
public float Magnification { get; set; }
Property Value
Type |
---|
System.Single |
PaletteCount
Gets the number of symbol palettes loaded in the GroupBar control.
Declaration
public int PaletteCount { get; }
Property Value
Type |
---|
System.Int32 |
SelectedNode
Gets the currently selected symbol model.
Declaration
public Node SelectedNode { get; }
Property Value
Type |
---|
Node |
ShowDragNodeCue
Gets or sets a value indicating whether dragged node cue is visible or not
Declaration
public bool ShowDragNodeCue { get; set; }
Property Value
Type |
---|
System.Boolean |
Methods
AddPalette()
Adds a new symbol palette to the GroupBar after prompting the user for the name of the new symbol palette to create.
Declaration
public SymbolPalette AddPalette()
Returns
Type | Description |
---|---|
SymbolPalette | Symbol palette to be added to groupbar. |
Remarks
AddPalette(SymbolPalette)
Adds an existing symbol palette to the GroupBar.
Declaration
public void AddPalette(SymbolPalette symbolPalette)
Parameters
Type | Name | Description |
---|---|---|
SymbolPalette | symbolPalette | Symbol palette to add. |
AddPalette(String)
Adds a new symbol palette to the GroupBar with the given name.
Declaration
public SymbolPalette AddPalette(string paletteName)
Parameters
Type | Name | Description |
---|---|---|
System.String | paletteName | Name of symbol palette to create. |
Returns
Type | Description |
---|---|
SymbolPalette | Symbol palette to be added to groupbar. |
Clear()
Removes all symbol palettes from the GroupBar.
Declaration
public void Clear()
Dispose(Boolean)
Clean up any resources being used.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | true to release both managed and unmanaged resources; false to release only unmanaged resources. |
Overrides
GetPalette(Int32)
Returns the symbol palette at the given index.
Declaration
public SymbolPalette GetPalette(int paletteIdx)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | paletteIdx | Zero-based index into the collection of symbol palettes loaded into the GroupBar control. |
Returns
Type | Description |
---|---|
SymbolPalette | SymbolPalette object or NULL if paletteIdx parameter is out of range. |
LoadPalette(String)
Loads a symbol palette from disk and adds it to the group bar.
Declaration
public PaletteGroupView LoadPalette(string fileName)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | Name of symbol palette file to load. |
Returns
Type | Description |
---|---|
PaletteGroupView | PaletteGroupView created to hold the symbol palette. |
SelectNode(Node)
Set the selected symbol model to the one matching the given symbol model name.
Declaration
public void SelectNode(Node node)
Parameters
Type | Name | Description |
---|---|---|
Node | node | Node to select. |
Events
NodeDoubleClick
Fired when the user double clicks a symbol model icon in a PaletteGroupBar component.
Declaration
public event NodeEventHandler NodeDoubleClick
Event Type
Type |
---|
NodeEventHandler |
NodeSelected
Fired when the user selects a symbol model icon in a PaletteGroupBar component.
Declaration
public event NodeEventHandler NodeSelected
Event Type
Type |
---|
NodeEventHandler |