New to Telerik UI for WPFStart a free 30-day trial

Abstract base implementation of the IDiagramItem interface.

Definition

Namespace:Telerik.Windows.Controls.Diagrams

Assembly:Telerik.Windows.Controls.Diagrams.dll

Syntax:

C#
public abstract class RadDiagramItem : ContentControl, IDiagramItem, ISerializable, ISupportMouseOver, IPropertyChanged, IGroupable, ISupportManipulation, ISupportVirtualization, IContainerChild, ICollapsible

Inheritance: objectRadDiagramItem

Derived Classes: RadDiagramShapeBaseRadDiagramConnection

Implements: ICollapsibleIContainerChildIDiagramItemIGroupableIPropertyChangedISerializableISupportManipulationISupportMouseOverISupportVirtualization...

Constructors

Initializes a new instance of the RadDiagramItem class.

C#
protected RadDiagramItem()

Fields

AllowCopyProperty

DependencyProperty

Identifies the AllowCopy dependency property.

C#
public static readonly DependencyProperty AllowCopyProperty

AllowCutProperty

DependencyProperty

Identifies the AllowCut dependency property.

C#
public static readonly DependencyProperty AllowCutProperty

AllowDeleteProperty

DependencyProperty

Identifies the AllowDelete dependency property.

C#
public static readonly DependencyProperty AllowDeleteProperty

AllowPasteProperty

DependencyProperty

Identifies the AllowPaste dependency property.

C#
public static readonly DependencyProperty AllowPasteProperty

BeginEditEvent

RoutedEvent

Identifies the BeginEdit routed event.

C#
public static readonly RoutedEvent BeginEditEvent

EditTemplateProperty

DependencyProperty

Identifies the EditTemplate dependency property.

C#
public static readonly DependencyProperty EditTemplateProperty

EndEditEvent

RoutedEvent

Identifies the EndEdit routed event.

C#
public static readonly RoutedEvent EndEditEvent

GroupProperty

DependencyProperty

Identifies the Group dependency property.

C#
public static readonly DependencyProperty GroupProperty

Identifies the IsConnectorsManipulationEnabled dependency property.

C#
public static readonly DependencyProperty IsConnectorsManipulationEnabledProperty

IsDraggingEnabledProperty

DependencyProperty

Identifies the IsDraggingEnabled dependency property.

C#
public static readonly DependencyProperty IsDraggingEnabledProperty

IsEditableProperty

DependencyProperty

Identifies the IsEditable dependency property.

C#
public static readonly DependencyProperty IsEditableProperty

IsInEditModeProperty

DependencyProperty

Identifies the IsInEditMode dependency property.

C#
public static readonly DependencyProperty IsInEditModeProperty

Identifies the IsManipulationAdornerVisible dependency property.

C#
public static readonly DependencyProperty IsManipulationAdornerVisibleProperty

IsResizingEnabledProperty

DependencyProperty

Identifies the IsResizingEnabled dependency property.

C#
public static readonly DependencyProperty IsResizingEnabledProperty

IsRotationEnabledProperty

DependencyProperty

Identifies the IsRotationEnabled dependency property.

C#
public static readonly DependencyProperty IsRotationEnabledProperty

IsSelectedProperty

DependencyProperty

Identifies the IsSelected dependency property.

C#
public static readonly DependencyProperty IsSelectedProperty

PositionProperty

DependencyProperty

Identifies the Position dependency property.

C#
public static readonly DependencyProperty PositionProperty

Identifies the PreviewBeginEdit routed event.

C#
public static readonly RoutedEvent PreviewBeginEditEvent

Identifies the PreviewEndEdit routed event.

C#
public static readonly RoutedEvent PreviewEndEditEvent

StrokeDashArrayProperty

DependencyProperty

Identifies the StrokeDashArray dependency property.

C#
public static readonly DependencyProperty StrokeDashArrayProperty

StrokeProperty

DependencyProperty

Identifies the Stroke dependency property.

C#
public static readonly DependencyProperty StrokeProperty

StrokeThicknessProperty

DependencyProperty

Identifies the StrokeThickness dependency property.

C#
public static readonly DependencyProperty StrokeThicknessProperty

ZIndexProperty

DependencyProperty

Identifies the ZIndex dependency property.

C#
public static readonly DependencyProperty ZIndexProperty

Properties

The actual size of the item.

C#
protected virtual Size ActualSize { get; }

Gets or sets a value indicating whether copying is allowed.

C#
public bool AllowCopy { get; set; }
Property Value:

True if copying is allowed; otherwise, false.

Implements: ISupportManipulation.AllowCopy

Gets or sets a value indicating whether cutting is allowed.

C#
public bool AllowCut { get; set; }
Property Value:

True if cutting is allowed; otherwise, false.

Implements: ISupportManipulation.AllowCut

Gets or sets a value indicating whether deleting is allowed.

C#
public bool AllowDelete { get; set; }
Property Value:

True if deleting is allowed; otherwise, false.

Implements: ISupportManipulation.AllowDelete

Gets or sets a value indicating whether pasting is allowed.

C#
public bool AllowPaste { get; set; }
Property Value:

True if pasting is allowed; otherwise, false.

Implements: ISupportManipulation.AllowPaste

Bounds

Rect

Gets the bounds.

C#
public virtual Rect Bounds { get; }
Property Value:

The bounds.

Implements: IDiagramItem.Bounds

Gets the owning diagram of this instance.

C#
protected IGraphInternal Diagram { get; }

EditTemplate

DataTemplate

Gets or sets the edit template.

C#
public DataTemplate EditTemplate { get; set; }
Property Value:

The edit template.

Gets the unique identifier of this entity.

C#
public string Id { get; }
Property Value:

An identifier for this entity.

Implements: IDiagramItem.Id

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

C#
public bool IsConnectorsManipulationEnabled { get; set; }
Property Value:

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

Implements: ISupportManipulation.IsConnectorsManipulationEnabled

Gets or sets a value indicating whether dragging is enabled.

C#
public bool IsDraggingEnabled { get; set; }
Property Value:

True if dragging is enabled; otherwise, false.

Implements: ISupportManipulation.IsDraggingEnabled

Gets or sets whether this item is dynamically generated.

C#
public bool IsDynamic { get; set; }
Property Value:

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.

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

C#
public bool IsEditable { get; set; }
Property Value:

True if editing is enabled; otherwise, false.

Implements: IDiagramItem.IsEditable

Remarks:

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

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

C#
public bool IsInEditMode { get; set; }
Property Value:

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

Implements: IDiagramItem.IsInEditMode

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

C#
public bool IsManipulationAdornerVisible { get; set; }
Property Value:

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

Implements: ISupportManipulation.IsManipulationAdornerVisible

Gets or sets a value indicating whether resizing is enabled.

C#
public bool IsResizingEnabled { get; set; }
Property Value:

True if resizing is enabled; otherwise, false.

Implements: ISupportManipulation.IsResizingEnabled

Gets or sets a value indicating whether rotation is enabled.

C#
public bool IsRotationEnabled { get; set; }
Property Value:

true if this rotation is enabled; otherwise, false.

Implements: ISupportManipulation.IsRotationEnabled

Gets or sets whether the diagram entity is selected.

C#
public bool IsSelected { get; set; }
Property Value:

True if selected; otherwise, false.

Implements: IDiagramItem.IsSelected

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

C#
protected bool IsSelectedInGroup { get; set; }
Property Value:

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

Gets whether any service is manipulating at the moment.

C#
protected bool IsServiceManipulation { get; }

Gets the parent container shape.

C#
public IContainerShape ParentContainer { get; }
Property Value:

The parent container.

Implements: IContainerChild.ParentContainer

Gets or sets the group.

C#
public IGroup ParentGroup { get; set; }
Property Value:

The group.

Implements: IGroupable.ParentGroup

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

C#
public Point Position { get; set; }

Implements: IDiagramItem.Position

Gets the service locator.

C#
protected IGraphServiceLocator ServiceLocator { get; }

Stroke

Brush

Gets or sets the stroke of this item.

C#
public Brush Stroke { get; set; }
Property Value:

The stroke.

StrokeDashArray

DoubleCollection

Gets or sets the stroke dash array of this item.

C#
public DoubleCollection StrokeDashArray { get; set; }
Property Value:

The stroke dash array.

Gets or sets the stroke thickness of this item.

C#
public double StrokeThickness { get; set; }
Property Value:

The stroke thickness.

Gets or sets the horizontal position of this item.

C#
public double X { get; set; }
Property Value:

The x-coordinate.

Gets or sets the vertical position of this item.

C#
public double Y { get; set; }
Property Value:

The y-coordinate.

Gets or sets the ZIndex of this instance.

C#
public int ZIndex { get; set; }

Implements: IDiagramItem.ZIndex

Methods

Deserializes the serialization info in this diagram entity.

C#
public virtual void Deserialize(SerializationInfo info)
Parameters:infoSerializationInfo

A SerializationInfo instance.

Implements: ISerializable.Deserialize(SerializationInfo)

Initializes the specified service locator and parent graph.

C#
protected virtual void Initialize(IGraphServiceLocator serviceLocator, IGraphInternal graph)
Parameters:serviceLocatorIGraphServiceLocator

The service locator.

graphIGraphInternal

The diagram control.

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.

C#
public override void OnApplyTemplate()

Creates a peer associated with this object.

C#
protected override AutomationPeer OnCreateAutomationPeer()
Returns:

AutomationPeer

An instance of the .

Called when the group name changes.

C#
protected virtual void OnGroupNameChanged()

Called when connectors manipulation changes.

C#
protected virtual void OnIsConnectorsManipulationEnabledChanged(bool newValue, bool oldValue)
Parameters:newValuebool

The new value.

oldValuebool

The old value.

Called when IsEditable has changed.

C#
protected virtual void OnIsEditableChanged(bool oldIsEditable, bool isEditable)
Parameters:oldIsEditablebool

The old value of the property.

isEditablebool

The current value of the property.

Called when IsInEditMode changes.

C#
protected virtual void OnIsInEditModeChanged(bool oldIsInEditMode, bool isInEditMode)
Parameters:oldIsInEditModebool

The old value of the property.

isInEditModebool

The current value of the property.

Called when the IsSelected property has changed.

C#
protected virtual void OnIsSelectedChanged(bool oldValue, bool newValue)
Parameters:oldValuebool

The old value of the IsSelected property.

newValuebool

The new value of the IsSelected property.

Called when position changes.

C#
protected virtual void OnPositionChanged(Point oldPosition, Point newPosition)
Parameters:oldPositionPoint

The old position.

newPositionPoint

The new position.

Called when [position coerced].

C#
protected virtual object OnPositionCoerced(Point position)
Parameters:positionPoint

The position.

Returns:

object

Called when a property value changed.

C#
protected virtual void OnPropertyChanged(string propertyName)
Parameters:propertyNamestring

Name of the property.

Called when the size changes.

C#
protected virtual void OnSizeChanged(Size newSize, Size oldSize)
Parameters:newSizeSize

The new size.

oldSizeSize

The old size.

Invoked when the StrokeThickness property has changed.

C#
protected virtual void OnStrokeThicknessChanged()

Called when the ZIndex changes.

C#
protected virtual void OnZIndexChanged(int newValue, int oldValue)
Parameters:newValueint

The new value.

oldValueint

The old value.

Refreshes the is selected in group property.

C#
protected virtual void RefreshIsSelectedInGroup()

Serializes this instance.

C#
public virtual SerializationInfo Serialize()
Returns:

SerializationInfo

Implements: ISerializable.Serialize()

Updates the visual states.

C#
protected virtual void UpdateVisualStates()

Events

Occurs when the editing begins.

C#
public event RadRoutedEventHandler BeginEdit

Occurs when the editing ends.

C#
public event EventHandler<RadRoutedEditEventArgs> EndEdit

Occurs when [group changed].

C#
public event EventHandler<PropertyEventArgs<IGroup>> ParentGroupChanged

Implements: IGroupable.ParentGroupChanged

Occurs before the editing starts.

C#
public event RadRoutedEventHandler PreviewBeginEdit

Occurs before the editing ends.

C#
public event EventHandler<RadRoutedEditEventArgs> PreviewEndEdit

Occurs when a property value changes.

C#
public event EventHandler<PropertyEventArgs> PropertyChanged

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