[DefaultMember("Item")] [Serializable()] public class GoIconicNode : GoNode, IGoCollection, IGoGraphPart, IGoIdentifiablePart, IGoLabeledNode, IGoLabeledPart, IGoNode
[DefaultMember("Item")] [Serializable()] public class GoIconicNode : GoNode, IGoCollection, IGoGraphPart, IGoIdentifiablePart, IGoLabeledNode, IGoLabeledPart, IGoNode
Call the Initialize
method to construct the standard parts of this kind of node.
The Icon is normally a GoImage, but could be any kind of GoObject. When it is a GoImage, the Image property gives you convenient access to the icon's image properties. The image will normally be sized to match the natural size of the Image
being drawn. You may want to set the Icon.Size
property to make sure the icon isn't too big or too small.
When then first two arguments to Initialize(ResourceManager,String,String) are null, the node is initialized to use a GoDrawing instead of a GoImage. After initialization you can set the Figure property if you want to display one of the standard GoFigures.
You can also set the Icon to be any kind of GoObject, including other kinds of GoShapes. The Shape property provides convenient access to the icon when it is a GoShape, to allow you to initialize its brush and/or pen. If your icon is a GoGroup, it might be convenient to override Shape and perhaps Figure to refer to the appropriate shape or drawing in the group.
The Label is normally centered below the Icon. You can set the LabelOffset property to position it elsewhere relative to the Icon. Furthermore, you can set the DraggableLabel property to allow the user to move it around.