WinForms

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ControlNode - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ControlNode

    This node can be used to host any .NET control inside it.

    Inheritance
    System.Object
    Node
    ControlNode
    Implements
    IUnitIndependent
    IDispatchNodeEvents
    System.Runtime.Serialization.ISerializable
    INode
    System.ICloneable
    IServiceReferenceHolder
    IServiceReferenceProvider
    IPropertyObserver
    IPropertyContainer
    System.IServiceProvider
    IGraphNode
    System.Runtime.Serialization.IDeserializationCallback
    System.IDisposable
    Inherited Members
    Node.m_rgnCache
    Node.m_fRotationAngle
    Node.m_mgrHistory
    Node.m_eventSink
    Node.m_mgrLink
    Node.m_mgrBridge
    Node.m_bLockUpdate
    Node.m_rectRefresh
    Node.m_bPortUpdating
    Node.ISerializable.GetObjectData(SerializationInfo, StreamingContext)
    Node.UpdateServiceReferences(IServiceReferenceProvider)
    Node.ProvideServiceReference(RuntimeTypeHandle)
    Node.GetPropertyContainerByName(String)
    Node.GetPropertyContainer(String)
    Node.OnPropertyChanging(String, String, Object)
    Node.Draw(Graphics)
    Node.Draw(Graphics, Boolean)
    Node.PrepareGraphics(Graphics)
    Node.RenderContiguousData(Graphics)
    Node.ContainsPoint(PointF)
    Node.ShowResizeHandles()
    Node.Translate(Single, Single, MeasureUnits)
    Node.Translate(Single, Single)
    Node.Rotate(Single)
    Node.Scale(Single, Single)
    Node.AppendFlipTransforms(Matrix)
    Node.AppendLocalFlipTransforms(Matrix)
    Node.GetTransformations()
    Node.GetLocalTransformations()
    Node.GetParentTransformation(Boolean)
    Node.AppendFlipTransforms(Matrix, PointF, Boolean, Boolean)
    Node.GetTransformations(PointF, SizeF, Single)
    Node.OnMeasurementUnitsChanging(MeasureUnits)
    Node.QuiteBoundarySet(Boolean)
    Node.DoPinOffsetRelatedActions(SizeF, SizeF)
    Node.DoMoveRelatedActions(Single, Single)
    Node.SafeHistoryPause()
    Node.SafeHistoryResume()
    Node.OnNodeScaleChanged(String)
    Node.UpdateBoundingRectangle()
    Node.GetNodeBounds(Boolean, Boolean)
    Node.GetRectBounds(Boolean, Boolean)
    Node.GetPathBounds()
    Node.UpdateRefreshRect()
    Node.UpdateRefreshRect(RectangleF, Matrix)
    Node.AccumulateRefreshRect(RectangleF)
    Node.GetScaleTransformation()
    Node.ConvertToNodeCoordinates(PointF)
    Node.ConvertToModelCoordinates(PointF)
    Node.Dispose()
    Node.Move(Single, Single)
    Node.ChangeFlipX(Boolean)
    Node.ChangeFlipY(Boolean)
    Node.ChangeRotationBy(Single)
    Node.SetPinOffset(SizeF, SizeF)
    Node.SetSize(SizeF, SizeF)
    Node.OnParentChanging()
    Node.OnParentChanged()
    Node.UpdateReferences(IServiceReferenceProvider)
    Node.LogicalUnitChange(GraphicsUnit)
    Node.UpdateHelperRegion()
    Node.CanWiden(GraphicsPath)
    Node.OnMouseClick(EventArgs)
    Node.OnMouseDoubleClick(EventArgs)
    Node.OnMouseEnter(EventArgs)
    Node.OnMouseLeave(EventArgs)
    Node.SetPinPoint(PointF, MeasureUnits)
    Node.EventSink_PropertyChanging(PropertyChangingEventArgs)
    Node.EventSink_PropertyChanged(PropertyChangedEventArgs)
    Node.CreateBoundsInfo()
    Node.CreateBoundsInfo(PointF, SizeF, SizeF)
    Node.CreateBoundsInfo(BoundsInfo)
    Node.CreateBoundsInfo(BoundsInfo, PageScale)
    Node.UpdatePortPositions(SizeF, SizeF)
    Node.UpdateContainerBounds()
    Node.CanUpdateConnections(EndPoint)
    Node.IsClosedPath(GraphicsPath)
    Node.GetBoundsRect(Node)
    Node.UpdateGraphicsPath(SizeF, SizeF)
    Node.GetUpperLeftPoint(MeasureUnits)
    Node.RecordPropertyChanged(String)
    Node.CheckConstrainingRegion(PointF)
    Node.CheckConstrainingRegion(RectangleF)
    Node.CheckNewPinPoint(PointF, MeasureUnits)
    Node.GetService(Type)
    Node.IUnitIndependent.GetPinPoint(MeasureUnits)
    Node.IUnitIndependent.GetSize(MeasureUnits)
    Node.IUnitIndependent.GetPinPointOffset(MeasureUnits)
    Node.IUnitIndependent.GetBoundingRectangle(MeasureUnits, Boolean)
    Node.IUnitIndependent.SetPinPoint(PointF, MeasureUnits)
    Node.IUnitIndependent.SetSize(SizeF, MeasureUnits)
    Node.IUnitIndependent.SetPinPointOffset(SizeF, MeasureUnits)
    Node.IDispatchNodeEvents.Click(EventArgs)
    Node.IDispatchNodeEvents.DoubleClick(EventArgs)
    Node.IDispatchNodeEvents.MouseEnter(EventArgs)
    Node.IDispatchNodeEvents.MouseLeave(EventArgs)
    Node.IDeserializationCallback.OnDeserialization(Object)
    Node.OnDeserialized()
    Node.AllowLabelDrag
    Node.TreatAsObstacle
    Node.PrintPorts
    Node.DrawPorts
    Node.Ports
    Node.ZOrder
    Node.EnableCentralPort
    Node.CentralPort
    Node.Tag
    Node.ExcludeFromLayout
    Node.IsExpanded
    Node.Name
    Node.FullName
    Node.Container
    Node.Parent
    Node.Root
    Node.Visible
    Node.Layers
    Node.LineHitTestPadding
    Node.MeasurementUnit
    Node.InheritContainerMeasureUnits
    Node.LogicalGraphicsPath
    Node.GraphicsPath
    Node.HistoryManager
    Node.EventSink
    Node.PropertyBag
    Node.ToolTipText
    Node.RefreshRect
    Node.BoundingRect
    Node.BoundsInfo
    Node.BoundingRectangle
    Node.Size
    Node.PinPointOffset
    Node.PinPoint
    Node.NodeScale
    Node.ShadowStyle
    Node.LineStyle
    Node.EditStyle
    Node.RotationAngle
    Node.FlipX
    Node.FlipY
    Node.FullContainerName
    Node.INode.Root
    Node.Edges
    Node.EdgesEntering
    Node.EdgesLeaving
    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 ControlNode : Node, IUnitIndependent, IDispatchNodeEvents, ISerializable, INode, ICloneable, IServiceReferenceHolder, IServiceReferenceProvider, IPropertyObserver, IPropertyContainer, IServiceProvider, IGraphNode, IDeserializationCallback, IDisposable

    Constructors

    ControlNode(ControlNode)

    Initializes a new instance of the ControlNode class.

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

    The SRC.

    ControlNode(SerializationInfo, StreamingContext)

    Initializes a new instance of the ControlNode class.

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

    The info.

    System.Runtime.Serialization.StreamingContext context

    The context.

    ControlNode(Control, RectangleF)

    Initializes a new instance of the ControlNode class.

    Declaration
    public ControlNode(Control ctrlHosting, RectangleF rectBounds)
    Parameters
    Type Name Description
    System.Windows.Forms.Control ctrlHosting

    The CTRL hosting.

    System.Drawing.RectangleF rectBounds

    The rect bounds.

    ControlNode(Control, RectangleF, MeasureUnits, Boolean, Boolean)

    Initializes a new instance of the ControlNode class.

    Declaration
    public ControlNode(Control ctrlHosting, RectangleF rectBounds, MeasureUnits measureUnits, bool bKeepControlSize, bool bExcludeOptimizeContentWithOverlay)
    Parameters
    Type Name Description
    System.Windows.Forms.Control ctrlHosting

    The CTRL hosting.

    System.Drawing.RectangleF rectBounds

    The rect bounds.

    MeasureUnits measureUnits

    The measure units.

    System.Boolean bKeepControlSize

    Keep the control size as control's image size.

    System.Boolean bExcludeOptimizeContentWithOverlay

    Exclude the rendering of the control node from the background when OptimizeContentWithOverlay is true.

    ControlNode(Control, RectangleF, Boolean, Boolean)

    Initializes a new instance of the ControlNode class.

    Declaration
    public ControlNode(Control ctrlHosting, RectangleF rectBounds, bool bKeepControlSize, bool bExcludeOptimizeContentWithOverlay)
    Parameters
    Type Name Description
    System.Windows.Forms.Control ctrlHosting

    The CTRL hosting.

    System.Drawing.RectangleF rectBounds

    The rect bounds.

    System.Boolean bKeepControlSize

    Keep the control size as control's image size.

    System.Boolean bExcludeOptimizeContentWithOverlay

    Exclude the rendering of the control node from the background when OptimizeContentWithOverlay is true.

    Fields

    m_bExcludeOptimizeContentWithOverlay

    Declaration
    public bool m_bExcludeOptimizeContentWithOverlay
    Field Value
    Type Description
    System.Boolean

    m_bKeepControlSize

    Declaration
    public bool m_bKeepControlSize
    Field Value
    Type Description
    System.Boolean

    m_ctrlHosting

    Control Host.

    Declaration
    protected Control m_ctrlHosting
    Field Value
    Type Description
    System.Windows.Forms.Control

    m_localSerializedData

    Declaration
    protected Hashtable m_localSerializedData
    Field Value
    Type Description
    System.Collections.Hashtable

    Properties

    Activated

    Gets a value indicating whether Node is activated.

    Declaration
    public bool Activated { get; }
    Property Value
    Type Description
    System.Boolean

    ActivateStyle

    Gets or sets the activate style.

    Declaration
    public ActivateStyle ActivateStyle { get; set; }
    Property Value
    Type Description
    ActivateStyle

    The activate style.

    ExcludeOptimizeContentWithOverlay

    Gets a value indicating whether the rendering of control node is excluded from the background when OptimizedContentWithOverlay is true. The ExcludeOptimizeContentWithOverlay is only applicable for DiagramWebControl.

    Declaration
    public bool ExcludeOptimizeContentWithOverlay { get; }
    Property Value
    Type Description
    System.Boolean

    HasSerializedData

    Check whether the node has serialized data

    Declaration
    public bool HasSerializedData { get; }
    Property Value
    Type Description
    System.Boolean

    HCP

    Gets hashtable for custom controls properties. Used during serialization.

    Declaration
    protected Hashtable HCP { get; }
    Property Value
    Type Description
    System.Collections.Hashtable

    HCParent

    Gets or sets the host control parent.

    Declaration
    public Control HCParent { get; set; }
    Property Value
    Type Description
    System.Windows.Forms.Control

    The host control parent.

    HostingControl

    Gets or sets the hosting control.

    Declaration
    public Control HostingControl { get; set; }
    Property Value
    Type Description
    System.Windows.Forms.Control

    The hosting control.

    KeepControlSize

    Gets a value indicating whether control size is used to print the control.

    Declaration
    public bool KeepControlSize { get; }
    Property Value
    Type Description
    System.Boolean

    Snapshot

    Gets the hosting control snapshot.

    Declaration
    public Image Snapshot { get; }
    Property Value
    Type Description
    System.Drawing.Image

    The snapshot.

    Methods

    Activate(PointF)

    Activate ControlNode.

    Declaration
    public void Activate(PointF ptHCLocation)
    Parameters
    Type Name Description
    System.Drawing.PointF ptHCLocation

    Hosting control location in client coordinates.

    Clone()

    Clones this instance.

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

    A new object that is a copy of this instance.

    Overrides
    Node.Clone()

    Deactivate()

    Deactivates control node.

    Declaration
    public void Deactivate()

    DeSerializeNode()

    Deserializes the node.

    Declaration
    public virtual void DeSerializeNode()

    DeSerializeNode(Hashtable)

    Deserializes the node.

    Declaration
    public virtual void DeSerializeNode(Hashtable hashProperties)
    Parameters
    Type Name Description
    System.Collections.Hashtable hashProperties

    To deserialize the hosted control's needed proeperties

    DoSizeRelatedActions(SizeF, SizeF)

    Performs additional changes on size value changed.

    Declaration
    protected override void DoSizeRelatedActions(SizeF szOldSize, SizeF szNewSize)
    Parameters
    Type Name Description
    System.Drawing.SizeF szOldSize

    Old size value.

    System.Drawing.SizeF szNewSize

    New size value.

    Overrides
    Node.DoSizeRelatedActions(SizeF, SizeF)

    GetObjectData(SerializationInfo, StreamingContext)

    Gets the object data.

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

    The info.

    System.Runtime.Serialization.StreamingContext context

    The context.

    Overrides
    Node.GetObjectData(SerializationInfo, StreamingContext)

    OnPropertyChanged(String, String)

    Called when property changed.

    Declaration
    public override void OnPropertyChanged(string strPropertyContainerName, string strPropertyName)
    Parameters
    Type Name Description
    System.String strPropertyContainerName

    Name of the property container.

    System.String strPropertyName

    Name of the property.

    Overrides
    Node.OnPropertyChanged(String, String)

    Render(Graphics)

    Renders shapes visual representation. on given graphics

    Declaration
    protected override void Render(Graphics gfx)
    Parameters
    Type Name Description
    System.Drawing.Graphics gfx

    Graphics to draw on

    Overrides
    Node.Render(Graphics)

    SerializeNode()

    Serialize the node

    Declaration
    public virtual void SerializeNode()

    SerializeNode(Hashtable)

    Serialize the node

    Declaration
    public virtual void SerializeNode(Hashtable hashProperties)
    Parameters
    Type Name Description
    System.Collections.Hashtable hashProperties

    To serialize the hosted control's needed proeperties

    UpdateControlSnapshot()

    Updates the HostingControl's snapshot.

    Declaration
    public void UpdateControlSnapshot()

    Implements

    IUnitIndependent
    IDispatchNodeEvents
    System.Runtime.Serialization.ISerializable
    INode
    System.ICloneable
    IServiceReferenceHolder
    IServiceReferenceProvider
    IPropertyObserver
    IPropertyContainer
    System.IServiceProvider
    IGraphNode
    System.Runtime.Serialization.IDeserializationCallback
    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2022 Syncfusion Inc. All Rights Reserved