Search
DiagramItem Members
Constructors Properties Methods
 


Represents an item in the diagram model. All classes representing diagram elements derive from DiagramItem.

The following tables list the members exposed by the DiagramItem type.

 Public Constructors

  Name Description

DiagramItem

Initializes a new instance of the DiagramItem class.

 Public Properties

  Name Description

brush

Gets or sets an object specifying how to fill the interior of this item.

container

Gets the parent ContainerNode containing this node.

effectiveBrush

Gets the effective brush that should be used to paint this item.

effectiveCaptionBackBrush

Gets the effective brush that should be used to paint node's caption bar.

effectiveFont

Gets the effective font that should be used to render this item's text.

effectiveFontName

Gets the name of the effective font that should be used to render this item's text.

effectiveFontSize

Gets the size of the effective font that should be used to render this item's text.

effectiveFontStyle

Gets the style of the effective font that should be used to render this item's text.

effectiveOpacity

Gets the effective opacity that should be used to paint this item.

effectiveShadowColor

Gets the effective color that should be used to render this item's shadow.

effectiveStroke

Gets the effective color that should be used to stroke this item.

effectiveStrokeDashArray

Gets the effective line dash array that should be applied when stroking this item.

effectiveStrokeDashOffset

Gets the effective line dash offset that should be applied when stroking this item.

effectiveStrokeDashStyle

Gets the effective line dash pattern that should be applied when stroking this item.

effectiveStrokeThickness

Gets the effective line thickness that should be applied when stroking this item.

effectiveTextColor

Gets the effective text color that should be used to render this item's text.

effectiveTextStroke

Gets the effective text color that should be used to render this item's text outline.

effectiveTextStrokeThickness

Gets the effective width of the text outline of this item.

font

Gets or sets the font used to render item's text.

graphicsContent

Gets an array of visual elements used to render this item on the canvas.

hyperLink

Gets or sets the hyperlink associated with this diagram item.

id

Gets or sets a custom identifier associated with this item.

ignoreLayout

Gets or sets a value indicating whether the position of this item should not be changed by automatic layout methods.

layoutTraits

Gets an object containing properties specific to individual layout algorithms.

lineAlignment

Gets or sets the vertical alignment of item's text.

locked

Gets or sets whether users are allowed to interact with this item.

opacity

Gets or sets opacity of this item.

parent

Gets the Diagram to which this item belongs.

pen

Gets or sets the color used to stroke item's borders.

selected

Gets or sets a value indicating whether a diagram item is selected.

shadowColor

Gets or sets the color used to draw item's shadow.

shadowOffsetX

Gets or sets the horizontal offset of item's shadow.

shadowOffsetY

Gets or sets the vertical offset of item's shadow.

stroke

Gets or sets the color used to stroke item's frame.

strokeDashArray

Gets or sets an array of values specifying the dash pattern.

strokeDashOffset

Gets or sets the the distance between the line start and the beginning of the dash pattern.

strokeDashStyle

Gets or sets the line dash pattern applied when stroking item's frame.

strokeThickness

Gets or sets the line width applied when stroking item's frame.

style

Gets or sets the style associated with this item.

tag

Gets or sets custom data tag associated with this item.

text

Gets or sets the text label displayed by this item.

textAlignment

Gets or sets the horizontal alignment of item's text.

textColor

Gets or sets the color used to fill item's text.

textComponent

Gets the Text object instance used to render item's text.

textPadding

Gets or sets the padding distance between item's boundaries and text label.

textStroke

Gets or sets the color used to stroke item's text.

textStrokeThickness

Gets or sets the outline width of item's text.

tooltip

Gets or sets tooltip text that should be displayed when the mouse hovers over this item.

topLevel

Gets if this is a top-level item in the diagram.

visible

Gets or sets a value indicating whether this item is visible.

weight

Gets or sets a weight value used by layout and path-finding algorithms.

zIndex

Gets the z-order position of this item.

 Public Methods

  Name Description

addCanvasElements

Derived classes must implement this method by adding their graphics primitives to the canvas.elements collection.

addLabel

Adds a new label to this item.

allowDrag

Invoked to validate the drag operation.

animate

Animates the item.

clone

Creates a copy of this item.

containsPoint

Determines whether this item contains the specified point.

endDrag

Invoked when the user stops dragging this item.

fromJson

Deserializes this item from a JSON object.

getRepaintBounds

Gets the repaint region for this item, taking into account factors such as pen width, selection handles and shadow.

hitTest

Returns the diagram item that contains the specified point.

invalidate

Invalidates the region of the canvas, that matches the item's repaint bounds.

loadFromXml

Loads the item content from an XML element.

onRemove

Called when an item is removed from a Diagram, either by the user, programmatically or via undo / redo.

removeCanvasElements

Derived classes must implement this method by removing their graphics primitives from the canvas.elements collection.

removeLabel

Removes the specified label from this item.

restoreState

Loads the properties of this diagram item.

saveLocationState

Saves the state of this DiagramItem.

saveState

Saves the properties of this diagram item.

saveToXml

Saves the item content into an XML element.

startDrag

Invoked when the user starts dragging this item.

toJson

Serializes this item into a JSON object.

updateCanvasElements

Derived classes must implement this method to update the item's visual elements.

updateDrag

Invoked while the user drags this item.

 See Also