Class ControlNode
This node can be used to host any .NET control inside it.
Implements
Inherited Members
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 |
---|
System.Boolean |
m_bKeepControlSize
Declaration
public bool m_bKeepControlSize
Field Value
Type |
---|
System.Boolean |
m_ctrlHosting
Control Host.
Declaration
protected Control m_ctrlHosting
Field Value
Type |
---|
System.Windows.Forms.Control |
m_localSerializedData
Declaration
protected Hashtable m_localSerializedData
Field Value
Type |
---|
System.Collections.Hashtable |
Properties
Activated
Gets a value indicating whether Node is activated.
Declaration
public bool Activated { get; }
Property Value
Type |
---|
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.
Declaration
public bool ExcludeOptimizeContentWithOverlay { get; }
Property Value
Type |
---|
System.Boolean |
HasSerializedData
Check whether the node has serialized data
Declaration
public bool HasSerializedData { get; }
Property Value
Type |
---|
System.Boolean |
HCP
Gets hashtable for custom controls properties. Used during serialization.
Declaration
protected Hashtable HCP { get; }
Property Value
Type |
---|
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 |
---|
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
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
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
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
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
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()