Class
RadDiagramContainerShape

A shape which holds other shapes much like an items container.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.Diagrams.dll

Syntax:

cs-api-definition
[Themable]
[TelerikToolboxCategory("Diagram")]
public class RadDiagramContainerShape : RadDiagramShapeBase, IContainerShape, IShape, IDiagramItem, ISerializable, ISupportMouseOver, IPropertyChanged, IGroupable, ISupportManipulation, ISupportVirtualization, IContainerChild, ICollapsible, ISupportRotation, IDragDropAware

Inheritance: objectRadDiagramItemRadDiagramShapeBaseRadDiagramContainerShape

Implements: ICollapsibleIContainerChildIContainerShapeIDiagramItemIDragDropAwareIGroupableIPropertyChangedISerializableIShapeISupportManipulationISupportMouseOverISupportRotationISupportVirtualization

Inherited Members RadDiagramShapeBase.IsActiveConnectionInsidePropertyRadDiagramShapeBase.RotationAnglePropertyRadDiagramShapeBase.ConnectorStylePropertyRadDiagramShapeBase.UseDefaultConnectorsPropertyRadDiagramShapeBase.UseGlidingConnectorPropertyRadDiagramShapeBase.GlidingStylePropertyRadDiagramShapeBase.ConnectorsPropertyRadDiagramShapeBase.GetXml()RadDiagramShapeBase.UpdateVisualStates()RadDiagramShapeBase.OnIsInEditModeChanged(bool, bool)RadDiagramShapeBase.OnRotationAngleChanged(double, double)RadDiagramShapeBase.RotationAngleRadDiagramShapeBase.ConnectorsRadDiagramShapeBase.ActualBoundsRadDiagramShapeBase.ConnectorStyleRadDiagramShapeBase.IncomingLinksRadDiagramShapeBase.OutgoingLinksRadDiagramShapeBase.UseDefaultConnectorsRadDiagramShapeBase.UseGlidingConnectorRadDiagramShapeBase.GlidingStyleRadDiagramShapeBase.TransformRadDiagramItem.ZIndexPropertyRadDiagramItem.IsSelectedPropertyRadDiagramItem.PositionPropertyRadDiagramItem.IsInEditModePropertyRadDiagramItem.IsEditablePropertyRadDiagramItem.EditTemplatePropertyRadDiagramItem.StrokePropertyRadDiagramItem.StrokeThicknessPropertyRadDiagramItem.StrokeDashArrayPropertyRadDiagramItem.GroupPropertyRadDiagramItem.IsResizingEnabledPropertyRadDiagramItem.IsRotationEnabledPropertyRadDiagramItem.IsDraggingEnabledPropertyRadDiagramItem.IsConnectorsManipulationEnabledPropertyRadDiagramItem.IsManipulationAdornerVisiblePropertyRadDiagramItem.AllowDeletePropertyRadDiagramItem.AllowCutPropertyRadDiagramItem.AllowCopyPropertyRadDiagramItem.AllowPastePropertyRadDiagramItem.PreviewBeginEditEventRadDiagramItem.BeginEditEventRadDiagramItem.PreviewEndEditEventRadDiagramItem.EndEditEventRadDiagramItem.RefreshIsSelectedInGroup()RadDiagramItem.OnIsEditableChanged(bool, bool)RadDiagramItem.OnIsSelectedChanged(bool, bool)RadDiagramItem.OnGroupNameChanged()RadDiagramItem.OnStrokeThicknessChanged()RadDiagramItem.OnPositionCoerced(Point)RadDiagramItem.OnIsConnectorsManipulationEnabledChanged(bool, bool)RadDiagramItem.IsSelectedRadDiagramItem.ParentGroupRadDiagramItem.ParentContainerRadDiagramItem.IsInEditModeRadDiagramItem.IsEditableRadDiagramItem.ZIndexRadDiagramItem.PositionRadDiagramItem.XRadDiagramItem.YRadDiagramItem.BoundsRadDiagramItem.IsDynamicRadDiagramItem.IdRadDiagramItem.EditTemplateRadDiagramItem.StrokeRadDiagramItem.StrokeThicknessRadDiagramItem.StrokeDashArrayRadDiagramItem.IsRotationEnabledRadDiagramItem.IsResizingEnabledRadDiagramItem.IsDraggingEnabledRadDiagramItem.IsConnectorsManipulationEnabledRadDiagramItem.IsManipulationAdornerVisibleRadDiagramItem.AllowDeleteRadDiagramItem.AllowCutRadDiagramItem.AllowCopyRadDiagramItem.AllowPasteRadDiagramItem.IsSelectedInGroupRadDiagramItem.DiagramRadDiagramItem.ServiceLocatorRadDiagramItem.ActualSizeRadDiagramItem.IsServiceManipulationRadDiagramItem.PropertyChangedRadDiagramItem.ParentGroupChangedRadDiagramItem.PreviewBeginEditRadDiagramItem.BeginEditRadDiagramItem.PreviewEndEditRadDiagramItem.EndEdit

Constructors

RadDiagramContainerShape()

Initializes a new instance of the RadDiagramContainerShape class.

Declaration

cs-api-definition
public RadDiagramContainerShape()

Fields

CollapsedContentProperty

Identifies the CollapsedContentProperty dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty CollapsedContentProperty

Field Value

DependencyProperty

CollapsedContentTemplateProperty

Identifies the CollapsedContentTemplateProperty dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty CollapsedContentTemplateProperty

Field Value

DependencyProperty

IsCollapsedChangedEvent

Identifies the IsCollapsedChanged routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent IsCollapsedChangedEvent

Field Value

RoutedEvent

IsCollapsedProperty

Identifies the IsCollapsedProperty dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsCollapsedProperty

Field Value

DependencyProperty

IsCollapsibleProperty

Identifies the IsCollapsibleProperty dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsCollapsibleProperty

Field Value

DependencyProperty

IsDropEnabledProperty

Identifies the IsDropEnabled dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsDropEnabledProperty

Field Value

DependencyProperty

ItemsProperty

Identifies the Items dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ItemsProperty

Field Value

DependencyProperty

ItemsSourceProperty

Identifies the ItemsSource dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ItemsSourceProperty

Field Value

DependencyProperty

Properties

Children

Gets the children.

Declaration

cs-api-definition
public IEnumerable<IDiagramItem> Children { get; }

Property Value

IEnumerable<IDiagramItem>

Implements IContainerShape.Children

CollapsedContent

Gets or sets the content of the collapsed state placeholder of the container.

Declaration

cs-api-definition
public object CollapsedContent { get; set; }

Property Value

object

The content.

CollapsedContentTemplate

Gets or sets the content template of the collapsed state placeholder of the container.

Declaration

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

Property Value

DataTemplate

The content.

ContentBounds

Gets or sets the content bounds.

Declaration

cs-api-definition
public Rect ContentBounds { get; set; }

Property Value

Rect

Implements IContainerShape.ContentBounds

IsCollapsed

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

Declaration

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

Property Value

bool

Implements ICollapsible.IsCollapsed

IsCollapsible

Gets or sets a value indicating whether this container is collapsible.

Declaration

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

Property Value

bool

True if this instance is collapsible; otherwise, false.

Implements IContainerShape.IsCollapsible

IsDropEnabled

Gets or sets whether drag-drop new items or removing items is enabled.

Declaration

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

Property Value

bool

IsDropPossible

Gets a value indicating whether drop operation is possible.

Declaration

cs-api-definition
protected virtual bool IsDropPossible { get; }

Property Value

bool

Items

Gets the items contained in this visual container.

Declaration

cs-api-definition
public DiagramItemCollection Items { get; }

Property Value

DiagramItemCollection

Implements IContainerShape.Items

ItemsSource

Gets or sets the items source for this container.

Declaration

cs-api-definition
public IEnumerable ItemsSource { get; set; }

Property Value

IEnumerable

Implements IContainerShape.ItemsSource

MinBounds

Gets the min bounds.

Declaration

cs-api-definition
public Rect MinBounds { get; set; }

Property Value

Rect

The min bounds.

Implements IContainerShape.MinBounds

Methods

AddItem(object, Point?)

Adds item to the Items collection.

Declaration

cs-api-definition
protected void AddItem(object item, Point? position = null)

Parameters

item

object

position

Point?

AddItems(IEnumerable<object>, bool)

Adds items to the Items collection.

Declaration

cs-api-definition
protected void AddItems(IEnumerable<object> items, bool updateLayout = true)

Parameters

items

IEnumerable<object>

updateLayout

bool

CalculateContentBounds(Rect)

Calculates the content bounds from the given shape bounds.

Declaration

cs-api-definition
protected virtual Rect CalculateContentBounds(Rect newShapeBounds)

Parameters

newShapeBounds

Rect

Returns

Rect

CalculateMinShapeBounds()

Calculates the minimum shape bounds.

Declaration

cs-api-definition
protected virtual Rect CalculateMinShapeBounds()

Returns

Rect

CalculateShapeBounds(Rect)

Calculates the shape bounds from the given content bounds.

Declaration

cs-api-definition
protected virtual Rect CalculateShapeBounds(Rect contentBounds)

Parameters

contentBounds

Rect

Returns

Rect

Deserialize(SerializationInfo)

Deserializes the serialization info in this diagram entity.

Declaration

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

Parameters

info

SerializationInfo

A SerializationInfo instance.

Overrides RadDiagramShapeBase.Deserialize(SerializationInfo)

Implements ISerializable.Deserialize(SerializationInfo)

FitToChildren()

Fits the size of the container to its children bounding box.

Declaration

cs-api-definition
public void FitToChildren()

Implements IContainerShape.FitToChildren()

GetParentContainer(DependencyObject)

Gets the parent container, if any.

Declaration

cs-api-definition
public static RadDiagramContainerShape GetParentContainer(DependencyObject obj)

Parameters

obj

DependencyObject

An object which sits possibly in a container.

Returns

RadDiagramContainerShape

Initialize(IGraphServiceLocator, IGraphInternal)

Initializes the specified service locator and parent graph.

Declaration

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

Parameters

serviceLocator

IGraphServiceLocator

The service locator.

graph

IGraphInternal

The diagram control.

Overrides RadDiagramItem.Initialize(IGraphServiceLocator, IGraphInternal)

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()

Overrides RadDiagramShapeBase.OnApplyTemplate()

OnChildBoundsChanged(IDiagramItem)

Called when [child bounds changed].

Declaration

cs-api-definition
protected virtual void OnChildBoundsChanged(IDiagramItem diagramItem)

Parameters

diagramItem

IDiagramItem

The diagram item.

OnContainerItemsDeserialized()

Called when the items in the containers have been deserialized and added to the Items collection.

Declaration

cs-api-definition
protected virtual void OnContainerItemsDeserialized()

OnCreateAutomationPeer()

Creates a peer associated with this object.

Declaration

cs-api-definition
protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer

An instance of the .

Overrides RadDiagramItem.OnCreateAutomationPeer()

OnDragEnter(DragItemsEventArgs)

Called on drag enter.

Declaration

cs-api-definition
protected virtual void OnDragEnter(DragItemsEventArgs args)

Parameters

args

DragItemsEventArgs

OnDragLeave(DragItemsEventArgs)

Called on drag leave.

Declaration

cs-api-definition
protected virtual void OnDragLeave(DragItemsEventArgs args)

Parameters

args

DragItemsEventArgs

The DragItemsEventArgs instance containing the event data.

OnDrop(DragItemsEventArgs)

Called on drop.

Declaration

cs-api-definition
protected virtual void OnDrop(DragItemsEventArgs args)

Parameters

args

DragItemsEventArgs

OnInitialized(EventArgs)

Raises the event. This method is invoked whenever is set to true internally.

Declaration

cs-api-definition
protected override void OnInitialized(EventArgs e)

Parameters

e

EventArgs

The RoutedEventArgs that contains the event data.

OnIsCollapsedChanged(bool, bool)

Called on is collapsed changed.

Declaration

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

Parameters

newValue

bool

oldValue

bool

OnIsDropEnabledPropertyChanged(bool, bool)

Called when the IsDropEnabled property changed.

Declaration

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

Parameters

oldValue

bool

The old value of the property.

newValue

bool

The new value of the property.

OnItemsCollectionChanged(object, NotifyCollectionChangedEventArgs)

Called when the items collection has been altered.

Declaration

cs-api-definition
protected virtual void OnItemsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)

Parameters

sender

object

The sender.

e

NotifyCollectionChangedEventArgs

The NotifyCollectionChangedEventArgs instance containing the event data.

Remarks

Note that the items are not necessarily shapes, but can be arbitrary objects.

OnManagerDrop(object, DragEventArgs)

Called on drag drop manager drop.

Declaration

cs-api-definition
protected virtual void OnManagerDrop(object sender, DragEventArgs e)

Parameters

sender

object

The sender.

e

DragEventArgs

The DragEventArgs instance containing the event data.

OnPositionChanged(Point, Point)

Called when the position of this container changes.

Declaration

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

Parameters

oldPosition

Point

The old position.

newPosition

Point

The new position.

Overrides RadDiagramShapeBase.OnPositionChanged(Point, Point)

OnPropertyChanged(string)

Called when a property value changed.

Declaration

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

Parameters

propertyName

string

Overrides RadDiagramItem.OnPropertyChanged(string)

OnSizeChanged(Size, Size)

Called when the size changes.

Declaration

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

Parameters

newSize

Size

The new size.

oldSize

Size

The old size.

Overrides RadDiagramItem.OnSizeChanged(Size, Size)

OnZIndexChanged(int, int)

Called when the ZIndex changes.

Declaration

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

Parameters

newValue

int

The new value.

oldValue

int

The old value.

Overrides RadDiagramItem.OnZIndexChanged(int, int)

RemoveItem(object)

Removes item from the Items collection.

Declaration

cs-api-definition
protected void RemoveItem(object item)

Parameters

item

object

RemoveItems(IEnumerable<object>, bool)

Removes items from the Items collection.

Declaration

cs-api-definition
protected void RemoveItems(IEnumerable<object> items, bool updateLayout = true)

Parameters

items

IEnumerable<object>

updateLayout

bool

Serialize()

Serializes this instance.

Declaration

cs-api-definition
public override SerializationInfo Serialize()

Returns

SerializationInfo

Overrides RadDiagramShapeBase.Serialize()

Implements ISerializable.Serialize()

UpdateChildrenPositions(Point, Point)

Updates the children positions on container position change.

Declaration

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

Parameters

oldPosition

Point

The old position.

newPosition

Point

The new position.

Events

IsCollapsedChanged

Occurs when the container IsCollapsed property has changed.

Declaration

cs-api-definition
public event RoutedEventHandler IsCollapsedChanged

Event Value

RoutedEventHandler