Class
RadDiagramItem

Abstract base implementation of the IDiagramItem interface.

Definition

Namespace:Telerik.Windows.Controls.Diagrams

Assembly:Telerik.Windows.Controls.Diagrams.dll

Syntax:

cs-api-definition
public abstract class RadDiagramItem : ContentControl, IDiagramItem, ISerializable, ISupportMouseOver, IPropertyChanged, IGroupable, ISupportManipulation, ISupportVirtualization, IContainerChild, ICollapsible

Inheritance: objectRadDiagramItem

Derived Classes: RadDiagramShapeBaseRadDiagramConnection

Implements: ICollapsibleIContainerChildIDiagramItemIGroupableIPropertyChangedISerializableISupportManipulationISupportMouseOverISupportVirtualization

Constructors

RadDiagramItem()

Initializes a new instance of the RadDiagramItem class.

Declaration

cs-api-definition
protected RadDiagramItem()

Fields

AllowCopyProperty

Identifies the AllowCopy dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty AllowCopyProperty

Field Value

DependencyProperty

AllowCutProperty

Identifies the AllowCut dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty AllowCutProperty

Field Value

DependencyProperty

AllowDeleteProperty

Identifies the AllowDelete dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty AllowDeleteProperty

Field Value

DependencyProperty

AllowPasteProperty

Identifies the AllowPaste dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty AllowPasteProperty

Field Value

DependencyProperty

BeginEditEvent

Identifies the BeginEdit routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent BeginEditEvent

Field Value

RoutedEvent

EditTemplateProperty

Identifies the EditTemplate dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty EditTemplateProperty

Field Value

DependencyProperty

EndEditEvent

Identifies the EndEdit routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent EndEditEvent

Field Value

RoutedEvent

GroupProperty

Identifies the Group dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty GroupProperty

Field Value

DependencyProperty

IsConnectorsManipulationEnabledProperty

Identifies the IsConnectorsManipulationEnabled dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsConnectorsManipulationEnabledProperty

Field Value

DependencyProperty

IsDraggingEnabledProperty

Identifies the IsDraggingEnabled dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsDraggingEnabledProperty

Field Value

DependencyProperty

IsEditableProperty

Identifies the IsEditable dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsEditableProperty

Field Value

DependencyProperty

IsInEditModeProperty

Identifies the IsInEditMode dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsInEditModeProperty

Field Value

DependencyProperty

IsManipulationAdornerVisibleProperty

Identifies the IsManipulationAdornerVisible dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsManipulationAdornerVisibleProperty

Field Value

DependencyProperty

IsResizingEnabledProperty

Identifies the IsResizingEnabled dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsResizingEnabledProperty

Field Value

DependencyProperty

IsRotationEnabledProperty

Identifies the IsRotationEnabled dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsRotationEnabledProperty

Field Value

DependencyProperty

IsSelectedProperty

Identifies the IsSelected dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsSelectedProperty

Field Value

DependencyProperty

PositionProperty

Identifies the Position dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty PositionProperty

Field Value

DependencyProperty

PreviewBeginEditEvent

Identifies the PreviewBeginEdit routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent PreviewBeginEditEvent

Field Value

RoutedEvent

PreviewEndEditEvent

Identifies the PreviewEndEdit routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent PreviewEndEditEvent

Field Value

RoutedEvent

StrokeDashArrayProperty

Identifies the StrokeDashArray dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty StrokeDashArrayProperty

Field Value

DependencyProperty

StrokeProperty

Identifies the Stroke dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty StrokeProperty

Field Value

DependencyProperty

StrokeThicknessProperty

Identifies the StrokeThickness dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty StrokeThicknessProperty

Field Value

DependencyProperty

ZIndexProperty

Identifies the ZIndex dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ZIndexProperty

Field Value

DependencyProperty

Properties

ActualSize

The actual size of the item.

Declaration

cs-api-definition
protected virtual Size ActualSize { get; }

Property Value

Size

AllowCopy

Gets or sets a value indicating whether copying is allowed.

Declaration

cs-api-definition
public bool AllowCopy { get; set; }

Property Value

bool

True if copying is allowed; otherwise, false.

Implements ISupportManipulation.AllowCopy

AllowCut

Gets or sets a value indicating whether cutting is allowed.

Declaration

cs-api-definition
public bool AllowCut { get; set; }

Property Value

bool

True if cutting is allowed; otherwise, false.

Implements ISupportManipulation.AllowCut

AllowDelete

Gets or sets a value indicating whether deleting is allowed.

Declaration

cs-api-definition
public bool AllowDelete { get; set; }

Property Value

bool

True if deleting is allowed; otherwise, false.

Implements ISupportManipulation.AllowDelete

AllowPaste

Gets or sets a value indicating whether pasting is allowed.

Declaration

cs-api-definition
public bool AllowPaste { get; set; }

Property Value

bool

True if pasting is allowed; otherwise, false.

Implements ISupportManipulation.AllowPaste

Bounds

Gets the bounds.

Declaration

cs-api-definition
public virtual Rect Bounds { get; }

Property Value

Rect

The bounds.

Implements IDiagramItem.Bounds

Diagram

Gets the owning diagram of this instance.

Declaration

cs-api-definition
protected IGraphInternal Diagram { get; }

Property Value

IGraphInternal

EditTemplate

Gets or sets the edit template.

Declaration

cs-api-definition
public DataTemplate EditTemplate { get; set; }

Property Value

DataTemplate

The edit template.

Id

Gets the unique identifier of this entity.

Declaration

cs-api-definition
public string Id { get; }

Property Value

string

An identifier for this entity.

Implements IDiagramItem.Id

IsConnectorsManipulationEnabled

Gets or sets a value indicating whether manipulation on the connectors is enabled.

Declaration

cs-api-definition
public bool IsConnectorsManipulationEnabled { get; set; }

Property Value

bool

True if manipulation on connectors is enabled; otherwise, false.

Implements ISupportManipulation.IsConnectorsManipulationEnabled

IsDraggingEnabled

Gets or sets a value indicating whether dragging is enabled.

Declaration

cs-api-definition
public bool IsDraggingEnabled { get; set; }

Property Value

bool

True if dragging is enabled; otherwise, false.

Implements ISupportManipulation.IsDraggingEnabled

IsDynamic

Gets or sets whether this item is dynamically generated.

Declaration

cs-api-definition
public bool IsDynamic { get; set; }

Property Value

bool

If true then this item will not be serialized as part of the diagram.

Implements IDiagramItem.IsDynamic

Remarks

In some applications or embeddings of RadDiagram (e.g. workflows) there are shapes or connections which are generated as part of some layout or organization. In those cases it doesn't make sense to serialize the elements which are automatically generated as part of the application. By setting this property to true the serialization pipeline will omit the element.

IsEditable

Gets or sets a value indicating whether editing is enabled on this item.

Declaration

cs-api-definition
public bool IsEditable { get; set; }

Property Value

bool

True if editing is enabled; otherwise, false.

Implements IDiagramItem.IsEditable

Remarks

Note that the similar higher-level IsEditable can potentially overrule this setting.

IsInEditMode

Gets or sets a value indicating whether this instance is in edit mode.

Declaration

cs-api-definition
public bool IsInEditMode { get; set; }

Property Value

bool

True if this instance is in edit mode; otherwise, false.

Implements IDiagramItem.IsInEditMode

IsManipulationAdornerVisible

Gets or sets a value indicating whether the manipulation adorner is visible.

Declaration

cs-api-definition
public bool IsManipulationAdornerVisible { get; set; }

Property Value

bool

True if the manipulation adorner is visible; otherwise, false.

Implements ISupportManipulation.IsManipulationAdornerVisible

IsResizingEnabled

Gets or sets a value indicating whether resizing is enabled.

Declaration

cs-api-definition
public bool IsResizingEnabled { get; set; }

Property Value

bool

True if resizing is enabled; otherwise, false.

Implements ISupportManipulation.IsResizingEnabled

IsRotationEnabled

Gets or sets a value indicating whether rotation is enabled.

Declaration

cs-api-definition
public bool IsRotationEnabled { get; set; }

Property Value

bool

true if this rotation is enabled; otherwise, false.

Implements ISupportManipulation.IsRotationEnabled

IsSelected

Gets or sets whether the diagram entity is selected.

Declaration

cs-api-definition
public bool IsSelected { get; set; }

Property Value

bool

True if selected; otherwise, false.

Implements IDiagramItem.IsSelected

IsSelectedInGroup

Gets a value indicating whether this instance is selected in group.

Declaration

cs-api-definition
protected bool IsSelectedInGroup { get; set; }

Property Value

bool

True if this item is selected in group; otherwise, false.

IsServiceManipulation

Gets whether any service is manipulating at the moment.

Declaration

cs-api-definition
protected bool IsServiceManipulation { get; }

Property Value

bool

ParentContainer

Gets the parent container shape.

Declaration

cs-api-definition
public IContainerShape ParentContainer { get; }

Property Value

IContainerShape

The parent container.

Implements IContainerChild.ParentContainer

ParentGroup

Gets or sets the group.

Declaration

cs-api-definition
public IGroup ParentGroup { get; set; }

Property Value

IGroup

The group.

Implements IGroupable.ParentGroup

Position

Gets or sets the position of the top left corner of the bounding rectangle of the item.

Declaration

cs-api-definition
public Point Position { get; set; }

Property Value

Point

Implements IDiagramItem.Position

ServiceLocator

Gets the service locator.

Declaration

cs-api-definition
protected IGraphServiceLocator ServiceLocator { get; }

Property Value

IGraphServiceLocator

Stroke

Gets or sets the stroke of this item.

Declaration

cs-api-definition
public Brush Stroke { get; set; }

Property Value

Brush

The stroke.

StrokeDashArray

Gets or sets the stroke dash array of this item.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
public DoubleCollection StrokeDashArray { get; set; }

Property Value

DoubleCollection

The stroke dash array.

StrokeThickness

Gets or sets the stroke thickness of this item.

Declaration

cs-api-definition
public double StrokeThickness { get; set; }

Property Value

double

The stroke thickness.

X

Gets or sets the horizontal position of this item.

Declaration

cs-api-definition
public double X { get; set; }

Property Value

double

The x-coordinate.

Y

Gets or sets the vertical position of this item.

Declaration

cs-api-definition
public double Y { get; set; }

Property Value

double

The y-coordinate.

ZIndex

Gets or sets the ZIndex of this instance.

Declaration

cs-api-definition
public int ZIndex { get; set; }

Property Value

int

Implements IDiagramItem.ZIndex

Methods

Deserialize(SerializationInfo)

Deserializes the serialization info in this diagram entity.

Declaration

cs-api-definition
public virtual void Deserialize(SerializationInfo info)

Parameters

info

SerializationInfo

A SerializationInfo instance.

Implements ISerializable.Deserialize(SerializationInfo)

Initialize(IGraphServiceLocator, IGraphInternal)

Initializes the specified service locator and parent graph.

Declaration

cs-api-definition
protected virtual void Initialize(IGraphServiceLocator serviceLocator, IGraphInternal graph)

Parameters

serviceLocator

IGraphServiceLocator

The service locator.

graph

IGraphInternal

The diagram control.

OnApplyTemplate()

When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call . In simplest terms, this means the method is called just before a UI element displays in an application. For more information, see Remarks.

Declaration

cs-api-definition
public override void OnApplyTemplate()

OnCreateAutomationPeer()

Creates a peer associated with this object.

Declaration

cs-api-definition
protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer

An instance of the .

OnGroupNameChanged()

Called when the group name changes.

Declaration

cs-api-definition
protected virtual void OnGroupNameChanged()

OnIsConnectorsManipulationEnabledChanged(bool, bool)

Called when connectors manipulation changes.

Declaration

cs-api-definition
protected virtual void OnIsConnectorsManipulationEnabledChanged(bool newValue, bool oldValue)

Parameters

newValue

bool

The new value.

oldValue

bool

The old value.

OnIsEditableChanged(bool, bool)

Called when IsEditable has changed.

Declaration

cs-api-definition
protected virtual void OnIsEditableChanged(bool oldIsEditable, bool isEditable)

Parameters

oldIsEditable

bool

The old value of the property.

isEditable

bool

The current value of the property.

OnIsInEditModeChanged(bool, bool)

Called when IsInEditMode changes.

Declaration

cs-api-definition
protected virtual void OnIsInEditModeChanged(bool oldIsInEditMode, bool isInEditMode)

Parameters

oldIsInEditMode

bool

The old value of the property.

isInEditMode

bool

The current value of the property.

OnIsSelectedChanged(bool, bool)

Called when the IsSelected property has changed.

Declaration

cs-api-definition
protected virtual void OnIsSelectedChanged(bool oldValue, bool newValue)

Parameters

oldValue

bool

The old value of the IsSelected property.

newValue

bool

The new value of the IsSelected property.

OnPositionChanged(Point, Point)

Called when position changes.

Declaration

cs-api-definition
protected virtual void OnPositionChanged(Point oldPosition, Point newPosition)

Parameters

oldPosition

Point

The old position.

newPosition

Point

The new position.

OnPositionCoerced(Point)

Called when [position coerced].

Declaration

cs-api-definition
protected virtual object OnPositionCoerced(Point position)

Parameters

position

Point

The position.

Returns

object

OnPropertyChanged(string)

Called when a property value changed.

Declaration

cs-api-definition
protected virtual void OnPropertyChanged(string propertyName)

Parameters

propertyName

string

Name of the property.

OnSizeChanged(Size, Size)

Called when the size changes.

Declaration

cs-api-definition
protected virtual void OnSizeChanged(Size newSize, Size oldSize)

Parameters

newSize

Size

The new size.

oldSize

Size

The old size.

OnStrokeThicknessChanged()

Invoked when the StrokeThickness property has changed.

Declaration

cs-api-definition
protected virtual void OnStrokeThicknessChanged()

OnZIndexChanged(int, int)

Called when the ZIndex changes.

Declaration

cs-api-definition
protected virtual void OnZIndexChanged(int newValue, int oldValue)

Parameters

newValue

int

The new value.

oldValue

int

The old value.

RefreshIsSelectedInGroup()

Refreshes the is selected in group property.

Declaration

cs-api-definition
protected virtual void RefreshIsSelectedInGroup()

Serialize()

Serializes this instance.

Declaration

cs-api-definition
public virtual SerializationInfo Serialize()

Returns

SerializationInfo

Implements ISerializable.Serialize()

UpdateVisualStates()

Updates the visual states.

Declaration

cs-api-definition
protected virtual void UpdateVisualStates()

Events

BeginEdit

Occurs when the editing begins.

Declaration

cs-api-definition
public event RadRoutedEventHandler BeginEdit

Event Value

RadRoutedEventHandler

EndEdit

Occurs when the editing ends.

Declaration

cs-api-definition
public event EventHandler<RadRoutedEditEventArgs> EndEdit

Event Value

EventHandler<RadRoutedEditEventArgs>

ParentGroupChanged

Occurs when [group changed].

Declaration

cs-api-definition
public event EventHandler<PropertyEventArgs<IGroup>> ParentGroupChanged

Event Value

EventHandler<PropertyEventArgs<IGroup>>

Implements IGroupable.ParentGroupChanged

PreviewBeginEdit

Occurs before the editing starts.

Declaration

cs-api-definition
public event RadRoutedEventHandler PreviewBeginEdit

Event Value

RadRoutedEventHandler

PreviewEndEdit

Occurs before the editing ends.

Declaration

cs-api-definition
public event EventHandler<RadRoutedEditEventArgs> PreviewEndEdit

Event Value

EventHandler<RadRoutedEditEventArgs>

PropertyChanged

Occurs when a property value changes.

Declaration

cs-api-definition
public event EventHandler<PropertyEventArgs> PropertyChanged

Event Value

EventHandler<PropertyEventArgs>

Implements IPropertyChanged.PropertyChanged

In this article
DefinitionConstructorsRadDiagramItem()FieldsAllowCopyPropertyAllowCutPropertyAllowDeletePropertyAllowPastePropertyBeginEditEventEditTemplatePropertyEndEditEventGroupPropertyIsConnectorsManipulationEnabledPropertyIsDraggingEnabledPropertyIsEditablePropertyIsInEditModePropertyIsManipulationAdornerVisiblePropertyIsResizingEnabledPropertyIsRotationEnabledPropertyIsSelectedPropertyPositionPropertyPreviewBeginEditEventPreviewEndEditEventStrokeDashArrayPropertyStrokePropertyStrokeThicknessPropertyZIndexPropertyPropertiesActualSizeAllowCopyAllowCutAllowDeleteAllowPasteBoundsDiagramEditTemplateIdIsConnectorsManipulationEnabledIsDraggingEnabledIsDynamicIsEditableIsInEditModeIsManipulationAdornerVisibleIsResizingEnabledIsRotationEnabledIsSelectedIsSelectedInGroupIsServiceManipulationParentContainerParentGroupPositionServiceLocatorStrokeStrokeDashArrayStrokeThicknessXYZIndexMethodsDeserialize(SerializationInfo)Initialize(IGraphServiceLocator, IGraphInternal)OnApplyTemplate()OnCreateAutomationPeer()OnGroupNameChanged()OnIsConnectorsManipulationEnabledChanged(bool, bool)OnIsEditableChanged(bool, bool)OnIsInEditModeChanged(bool, bool)OnIsSelectedChanged(bool, bool)OnPositionChanged(Point, Point)OnPositionCoerced(Point)OnPropertyChanged(string)OnSizeChanged(Size, Size)OnStrokeThicknessChanged()OnZIndexChanged(int, int)RefreshIsSelectedInGroup()Serialize()UpdateVisualStates()EventsBeginEditEndEditParentGroupChangedPreviewBeginEditPreviewEndEditPropertyChanged
Not finding the help you need?
Contact Support