Search
DiagramItem Members
Constructors Fields Properties Methods
 


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

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

 Protected Constructors

  Name Description

DiagramItem

Overloaded. Initializes a new instance of the DiagramItem class.

 Public Fields

  Name Description

BrushProperty

Idendifies the Brush dependency property.

FontFamilyProperty

Identifies the FontFamily dependency property.

FontSizeProperty

Identifies the FontSize dependency property.

FontStretchProperty

Identifies the FontStretch dependency property.

FontStyleProperty

Identifies the FontStyle dependency property.

FontWeightProperty

Identifies the FontWeight dependency property.

IdProperty

Identifies the Id dependency property.

StrokeDashCapProperty

Identifies the StrokeDashCap dependency property.

StrokeDashStyleProperty

Identifies the StrokeDashStyle dependency property.

StrokeEndLineCapProperty

Identifies the StrokeEndLineCap dependency property.

StrokeLineJoinProperty

Identifies the StrokeLineJoin dependency property.

StrokeMiterLimitProperty

Identifies the StrokeMiterLimit dependency property.

StrokeProperty

Identifies the Stroke dependency property.

StrokeStartLineCapProperty

Identifies the StrokeStartLineCap dependency property.

StrokeThicknessProperty

Identifies the StrokeThickness dependency property.

TextAlignmentProperty

Identifies the TextAlignment dependency property.

TextBrushProperty

Identifies the TextBrush dependency property.

TextDecorationsProperty

Identifies the TextDecorations dependency property.

TextPaddingProperty

Identifies the TextPadding dependency property.

TextProperty

Identifies the Text dependency property.

TextTrimmingProperty

Identifies the TextTrimming dependency property.

TextVerticalAlignmentProperty

Identifies the TextVerticalAlignment dependency property.

TextWrappingProperty

Identifies the TextWrapping dependency property.

 Protected Fields

  Name Description

disposed

For internal use.

 Public Properties

  Name Description

Adorner

A Visual that contains the item's adjustment handles.

Brush

Gets or sets the brush used to fill the interior of this item.

ConstrainedHeight

Gets whether text layout area has limited height.

FontFamily

Gets or sets the preferred font family for this DiagramItem.

FontSize

Gets or sets the font size for this DiagramItem.

FontStretch

Gets or sets the font-stretching characteristics for this DiagramItem.

FontStyle

Gets or sets the font style for this DiagramItem.

FontWeight

Gets or sets the font weight for this DiagramItem.

HyperLink

Gets or sets the hyperlink associated with this diagram item.

Id

Gets or sets user-defined 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.

LayerIndex

Gets or sets the zero-based index of the layer this item is associated with, or -1, if the item is not associated with a layer.

LayoutTraits

Contains properties specific to each layout algorithm.

Locked

Gets or sets a value indicating whether users are allowed to edit the diagram item.

Parent

Gets the diagram that contains this item.

Printable

Gets or sets a value indicating whether to print the item.

RuntimeIndex

For internal use.

Selected

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

Stroke

Gets or sets the Brush that specifies how the item outline is painted.

StrokeDashCap

Gets or sets a PenLineCap enumeration value that specifies how the ends of a dash are drawn.

StrokeDashStyle

Gets or sets the pattern of dashes and gaps used to outline items.

StrokeEndLineCap

Gets or sets a PenLineCap enumeration value that specifies what shape to draw at the end of a Stroke.

StrokeLineJoin

Gets or sets a PenLineJoin enumeration value that specifies the type of join that is used at the vertices of the item's outline.

StrokeMiterLimit

Gets or sets a limit on the ratio of the miter length to half the StrokeThickness of an item outline element.

StrokeStartLineCap

Gets or sets a PenLineCap enumeration value that specifies what shape to draw at the start of a Stroke.

StrokeThickness

Gets or sets the width of the DiagramItem stroke outline.

SubordinateGroup

Gets a reference to the group of items that are attached to this one.

Text

Gets or sets the text displayed inside this item.

TextAlignment

Gets or sets a value that indicates the horizontal alignment of text content.

TextBrush

Gets or sets the brush used to draw the item's text.

TextDecorations

Gets or sets the effects to apply to the text of this DiagramItem.

TextPadding

Gets or sets the thickness of padding space between the item boundaries and its text.

TextTrimming

Gets or sets the text trimming to employ when text overflows the item area.

TextVerticalAlignment

Gets or sets a value that indicates the vertical alignment of text content.

TextWrapping

Gets or sets how this DiagramItem should wrap text.

TopLevel

True if this is a top-level item in the diagram, or false if it is inside a container.

UIElement

Gets the UIElement associated with this DiagramItem.

Visible

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

Weight

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

ZIndex

Gets or sets the z-order position of this item.

 Protected Properties

  Name Description

MeasureUnit

Returns the diagram measure unit.

Size

Gets the size of this item.

 Public Methods

  Name Description

ClearStyleableProperties

Clears the local values of all styleable appearance properties.

Clone

Creates a copy of this item.

ContainsPoint

Overloaded.  

Dispose

Overloaded.  

Draw

Draws the item on the specified DrawingContext object.

DrawHandles

Renders the selection handles.

GetBounds

Gets the bounding rectangle of this item.

GetRegion

Returns a Geometry object representing the shape of this item.

GetRepaintRect

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

GetRotatedBounds

Gets the bounding rectangle of this item when it is rotated.

GetRotationAngle

Gets the item rotation angle.

GetToolTip

Gets the tooltip that should be displayed for this item at the specified point.

HitTest

Returns the diagram item that contains the specified point.

HitTestHandle

Determines whether a selection handle of this item is located at the specified point.

HitTestManipulators

Triggers the manipulator located at the specified point.

Intersects

Checks whether the specified rectangle intersects with this diagram item.

LabelFromPoint

Returns the ItemLabel located at specified point.

NotInteractive

Gets whether the user is prevented from manipulating this item.

NowModifying

Gets a flag indicating whether this object is being currently modified interactively by the user.

Query

Returns the items that can be reached from this item by following the path specified in the given query expression.

Repaint

Overloaded.  

TransformDiagramToItem

Transforms a point from document coordinates to item coordinates.

TransformItemToDiagram

Transforms point from item-relative coordinates to document coordinates.

ZBottom

Moves the item to the bottom of the z-order.

ZLevelDown

Moves the item one level down in the z-order.

ZLevelUp

Moves the item one level up in the z-order.

ZTop

Moves the item to the top of the z-order.

 Protected Methods

  Name Description

AddToVisualContainer

Adds this item to specified container element.

AllowCreate

Invoked during interactive creation of items to test whether the operation can be completed in the current context.

AllowModify

Invoked during interactive modification of items to test whether the operation can be completed in the current context.

CompleteCreate

Invoked when the item creation has been completed.

CompleteModify

Overloaded.  

CreateProperties

Creates an item property set corresponding to the type of this diagram item.

CreateRenderer

Returns a FrameworkElement used to render this item in the DiagramView.

CreateState

Creates an item state corresponding to the type of this diagram item.

DrawManipulators

Draws the associated manipulators in the specified context.

EnumStyleableProperties

Applies specified function on properties intended to be set from WPF styles.

FreeResources

Called when the item is completely disassociated from a Diagram, that is, when it is no longer referenced from an item collection or the undo/redo history.

GetHeight

Gets the height of this item.

GetTextRect

Subtracts the TextPadding values from the specified rectangle.

GetWidth

Gets the width of this item.

GetX

Gets the x-coordinate of the current position of this item.

GetY

Gets the y-coordinate of the current position of this item.

LoadFromJson

Loads the item from a JSON object.

LoadFromXml

Loads the item content from an XML element.

MeasureOverride

FrameworkElement.MeasureOverride override.

OnAdd

Called when the item is added to a Diagram, either by the user, programmatically or performing undo / redo.

OnAppearanceChanged

Invoked when any of the item's appearance properties changes.

OnChildModified

Called when a child node has been modified.

OnChildModifying

Called when a child node is being modified.

OnLoad

Called after successful deserialization.

OnMeasureUnitChanged

Called when the diagram's MeasureUnit changes.

OnMouseDown

UIElement.OnMouseDown override.

OnMouseUp

UIElement.OnMouseUp override.

OnPositioningChanged

Called when the item's position changes.

OnPreviewMouseDown

UIElement.OnPreviewMouseWheel override.

OnPreviewMouseUp

UIElement.OnPreviewMouseUp override.

OnRemove

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

OnRender

UIElement.OnRender override.

OnSerializablePropertyChanged

Invoked when a FrameworkElement property serializable by DiagramItem changes.

OnSizeChanged

Called when the size of the item changes.

OnStrokeAttributeChanged

Invoked when any of the item's stroke attributes changes.

OnTextAttributeChanged

Invoked when any of the attributes defined in ITextAttributes changes.

OnZoomChanged

Called when the ZoomFactor changes.

RestoreProperties

Restores the properties of this diagram item.

RestoreState

Restores the state of this diagram item.

SaveProperties

Saves the properties of this diagram item.

SaveState

Saves the state of this diagram item.

SaveToJson

Saves the item as a JSON object.

SaveToXml

Saves the item content into an XML element.

SetDiagramDirty

Marks the diagram as changed.

SetExpanded

Sets whether the item is in expanded or collapsed state.

ShouldRender

Determines whether the item should be rendered in the current context.

StartCreate

Invoked once when the user starts creating a new item interactively.

StartModify

Invoked when the user starts modifying this item interactively.

UpdateCreate

Invoked during interactive creation of this item.

UpdateGroup

Called to update the positions of subordinate nodes attached to this item when the attachment style is set to ControlledByMaster.

UpdateModify

Invoked during interactive modification of this item.

 See Also