WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SymbolPalette

    Show / Hide Table of Contents

    Class SymbolPalette

    A symbol palette is a collection of related SymbolModel objects used to add symbols to a diagram.

    Inheritance
    System.Object
    SymbolPalette
    Implements
    System.Runtime.Serialization.ISerializable
    System.ICloneable
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.Windows.Forms.Diagram
    Assembly: Syncfusion.Diagram.Base.dll
    Syntax
    public class SymbolPalette : ISerializable, ICloneable
    Remarks

    This class is a special type of model object that contains only SymbolModel objects. SymbolPalettes are serializable and can be saved to a file and reloaded. This class is used in conjunction with the PaletteGroupBar control, which displays the contents a SymbolPalette and allows the user to drag-and-drop symbols onto a diagram. Model

    Constructors

    SymbolPalette()

    Initializes a new instance of the SymbolPalette class.

    Declaration
    public SymbolPalette()

    SymbolPalette(SymbolPalette)

    Initializes a new instance of the SymbolPalette class.

    Declaration
    public SymbolPalette(SymbolPalette src)
    Parameters
    Type Name Description
    SymbolPalette src

    The SRC.

    SymbolPalette(SerializationInfo, StreamingContext)

    Initializes a new instance of the SymbolPalette class.

    Declaration
    protected SymbolPalette(SerializationInfo info, StreamingContext context)
    Parameters
    Type Name Description
    System.Runtime.Serialization.SerializationInfo info

    Serialization state information.

    System.Runtime.Serialization.StreamingContext context

    Streaming context information.

    SymbolPalette(String)

    Initializes a new instance of the SymbolPalette class.

    Declaration
    public SymbolPalette(string strPaletteName)
    Parameters
    Type Name Description
    System.String strPaletteName

    Palette name.

    Properties

    LargeImageList

    Gets or sets large System.Windows.Forms.ImageList.

    Declaration
    public ImageList LargeImageList { get; set; }
    Property Value
    Type Description
    System.Windows.Forms.ImageList

    Name

    Gets or sets name of the palette.

    Declaration
    public string Name { get; set; }
    Property Value
    Type Description
    System.String

    Nodes

    Gets the copy of containing node collection.

    Declaration
    public NodeCollection Nodes { get; }
    Property Value
    Type Description
    NodeCollection

    The copy of containing node collection..

    PaletteNodes

    Gets palette nodes collection.

    Declaration
    protected NodeCollection PaletteNodes { get; }
    Property Value
    Type Description
    NodeCollection

    RenderingStyle

    Gets the SymbolPalette rendering style.

    Declaration
    public RenderingStyle RenderingStyle { get; }
    Property Value
    Type Description
    RenderingStyle

    The rendering style.

    Remarks

    The rendering style is used to configure graphics.

    SmallImageList

    Gets or sets small System.Windows.Forms.ImageList of the palette.

    Declaration
    public ImageList SmallImageList { get; set; }
    Property Value
    Type Description
    System.Windows.Forms.ImageList

    Methods

    AppendChild(Node)

    Add node to the palette nodes and updates its icon to display on GroupView.

    Declaration
    public int AppendChild(Node nodeNewPaletteNode)
    Parameters
    Type Name Description
    Node nodeNewPaletteNode

    Node to add.

    Returns
    Type Description
    System.Int32

    Index of added node in the palette nodes collection.

    Clone()

    Creates a new object that is a copy of the current instance.

    Declaration
    public object Clone()
    Returns
    Type Description
    System.Object

    A new object that is a copy of this instance.

    FromFile(String)

    Loads the symbol palette from the given path.

    Declaration
    public SymbolPalette FromFile(string filepath)
    Parameters
    Type Name Description
    System.String filepath

    Path of the file.

    Returns
    Type Description
    SymbolPalette

    Symbol palette.

    GetObjectData(SerializationInfo, StreamingContext)

    Populates a System.Runtime.Serialization.SerializationInfo with the data needed to serialize the target object.

    Declaration
    protected virtual void GetObjectData(SerializationInfo info, StreamingContext context)
    Parameters
    Type Name Description
    System.Runtime.Serialization.SerializationInfo info

    The System.Runtime.Serialization.SerializationInfo to populate with data.

    System.Runtime.Serialization.StreamingContext context

    The destination (see System.Runtime.Serialization.StreamingContext) for this serialization.

    Exceptions
    Type Condition
    System.Security.SecurityException

    The caller does not have the required permission.

    InsertChild(Node, Int32)

    Inserts node at specified location.

    Declaration
    public void InsertChild(Node nodeToInsert, int nIndex)
    Parameters
    Type Name Description
    Node nodeToInsert

    Node to insert.

    System.Int32 nIndex

    Insert index.

    InsertImage(Node)

    Update icon associated with given Node.

    Declaration
    public void InsertImage(Node node)
    Parameters
    Type Name Description
    Node node

    Node to update icon.

    IsUserDefinedLargeIcon(Int32)

    Gets value indicates that large icon for given node is user defined.

    Declaration
    public bool IsUserDefinedLargeIcon(int index)
    Parameters
    Type Name Description
    System.Int32 index

    Index of the Node to check icon.

    Returns
    Type Description
    System.Boolean

    TRUE if icon is user definite, otherwise FALSE.

    IsUserDefinedSmallIcon(Int32)

    Gets value indicates that small icon for given node is user defined.

    Declaration
    public bool IsUserDefinedSmallIcon(int index)
    Parameters
    Type Name Description
    System.Int32 index

    Index of the Node to check icon.

    Returns
    Type Description
    System.Boolean

    TRUE if icon is user definite, otherwise FALSE.

    IsUserDefinitedLargeIcon(Int32)

    Gets value indicates that large icon for given node is user definite.

    Declaration
    [Obsolete("Use IsUserDefiniteLargeIcon")]
    public bool IsUserDefinitedLargeIcon(int index)
    Parameters
    Type Name Description
    System.Int32 index

    Index of the Node to check icon.

    Returns
    Type Description
    System.Boolean

    TRUE if icon is user definite, otherwise FALSE.

    IsUserDefinitedSmallIcon(Int32)

    Gets value indicates that small icon for given node is user definite.

    Declaration
    [Obsolete("Use IsUserDefiniteSmallIcon")]
    public bool IsUserDefinitedSmallIcon(int index)
    Parameters
    Type Name Description
    System.Int32 index

    Index of the Node to check icon.

    Returns
    Type Description
    System.Boolean

    TRUE if icon is user definite, otherwise FALSE.

    MakeNodeSnapshot(Node, Size)

    Makes snapshot for given node.

    Declaration
    protected Image MakeNodeSnapshot(Node node, Size szImg)
    Parameters
    Type Name Description
    Node node

    Node to make snapshot.

    System.Drawing.Size szImg

    Size of returned snapshot.

    Returns
    Type Description
    System.Drawing.Image

    Snapshot for given node.

    OnPaletteChildrenComplete(CollectionExEventArgs)

    Raises the PaletteChildrenComplete event.

    Declaration
    protected virtual void OnPaletteChildrenComplete(CollectionExEventArgs evtArgs)
    Parameters
    Type Name Description
    CollectionExEventArgs evtArgs

    The CollectionExEventArgs instance containing the event data.

    RecreateIcons()

    Force recreation icons to display on GroupView.

    Declaration
    public void RecreateIcons()

    RemoveChild(Node)

    Remove node and its icons.

    Declaration
    public void RemoveChild(Node nodePaletteChild)
    Parameters
    Type Name Description
    Node nodePaletteChild

    Node to remove.

    SetUserLargeImage(Int32, Image)

    Sets user definite large image to the node by its index.

    Declaration
    public void SetUserLargeImage(int index, Image image)
    Parameters
    Type Name Description
    System.Int32 index

    Index of the node to set icon

    System.Drawing.Image image

    Icon to set.

    SetUserSmallImage(Int32, Image)

    Sets user definite small image to the node by its index.

    Declaration
    public void SetUserSmallImage(int index, Image image)
    Parameters
    Type Name Description
    System.Int32 index

    Index of the node to set icon

    System.Drawing.Image image

    Icon to set.

    UpdateIcons()

    Updates icons to display on GroupView.

    Declaration
    public void UpdateIcons()

    UpdateImage(Int32)

    Updates icons by ones index.

    Declaration
    public void UpdateImage(int index)
    Parameters
    Type Name Description
    System.Int32 index

    Index of icons in the ImageList

    UpdateNode(Node, Int32)

    Update node in collection to given node by its index.

    Declaration
    public void UpdateNode(Node node, int index)
    Parameters
    Type Name Description
    Node node

    Node to insert.

    System.Int32 index

    Index of old node.

    Events

    PaletteChildrenChanged

    Occurs when collection of the nodes was changed.

    Declaration
    public event CollectionEEventHandler PaletteChildrenChanged
    Event Type
    Type Description
    CollectionEEventHandler

    Explicit Interface Implementations

    ISerializable.GetObjectData(SerializationInfo, StreamingContext)

    Populates a System.Runtime.Serialization.SerializationInfo with the data needed to serialize the target object.

    Declaration
    void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
    Parameters
    Type Name Description
    System.Runtime.Serialization.SerializationInfo info

    The System.Runtime.Serialization.SerializationInfo to populate with data.

    System.Runtime.Serialization.StreamingContext context

    The destination (see System.Runtime.Serialization.StreamingContext) for this serialization.

    Exceptions
    Type Condition
    System.Security.SecurityException

    The caller does not have the required permission.

    Implements

    System.Runtime.Serialization.ISerializable
    System.ICloneable
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved