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

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

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.Diagrams.dll

Syntax:

C#
[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

Initializes a new instance of the RadDiagramContainerShape class.

C#
public RadDiagramContainerShape()

Fields

CollapsedContentProperty

DependencyProperty

Identifies the CollapsedContentProperty dependency property.

C#
public static readonly DependencyProperty CollapsedContentProperty

Identifies the CollapsedContentTemplateProperty dependency property.

C#
public static readonly DependencyProperty CollapsedContentTemplateProperty

Identifies the IsCollapsedChanged routed event.

C#
public static readonly RoutedEvent IsCollapsedChangedEvent

IsCollapsedProperty

DependencyProperty

Identifies the IsCollapsedProperty dependency property.

C#
public static readonly DependencyProperty IsCollapsedProperty

IsCollapsibleProperty

DependencyProperty

Identifies the IsCollapsibleProperty dependency property.

C#
public static readonly DependencyProperty IsCollapsibleProperty

IsDropEnabledProperty

DependencyProperty

Identifies the IsDropEnabled dependency property.

C#
public static readonly DependencyProperty IsDropEnabledProperty

ItemsProperty

DependencyProperty

Identifies the Items dependency property.

C#
public static readonly DependencyProperty ItemsProperty

ItemsSourceProperty

DependencyProperty

Identifies the ItemsSource dependency property.

C#
public static readonly DependencyProperty ItemsSourceProperty

Properties

Gets the children.

C#
public IEnumerable<IDiagramItem> Children { get; }

Implements: IContainerShape.Children

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

C#
public object CollapsedContent { get; set; }
Property Value:

The content.

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

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

The content.

Gets or sets the content bounds.

C#
public Rect ContentBounds { get; set; }

Implements: IContainerShape.ContentBounds

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

C#
public bool IsCollapsed { get; set; }

Implements: ICollapsible.IsCollapsed

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

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

True if this instance is collapsible; otherwise, false.

Implements: IContainerShape.IsCollapsible

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

C#
public bool IsDropEnabled { get; set; }

Gets a value indicating whether drop operation is possible.

C#
protected virtual bool IsDropPossible { get; }

Gets the items contained in this visual container.

C#
public DiagramItemCollection Items { get; }

Implements: IContainerShape.Items

Gets or sets the items source for this container.

C#
public IEnumerable ItemsSource { get; set; }

Implements: IContainerShape.ItemsSource

Gets the min bounds.

C#
public Rect MinBounds { get; set; }
Property Value:

The min bounds.

Implements: IContainerShape.MinBounds

Methods

Adds item to the Items collection.

C#
protected void AddItem(object item, Point? position = null)
Parameters:itemobjectpositionPoint?

Adds items to the Items collection.

C#
protected void AddItems(IEnumerable<object> items, bool updateLayout = true)
Parameters:itemsIEnumerable<object>updateLayoutbool

Calculates the content bounds from the given shape bounds.

C#
protected virtual Rect CalculateContentBounds(Rect newShapeBounds)
Parameters:newShapeBoundsRectReturns:

Rect

Calculates the minimum shape bounds.

C#
protected virtual Rect CalculateMinShapeBounds()
Returns:

Rect

Calculates the shape bounds from the given content bounds.

C#
protected virtual Rect CalculateShapeBounds(Rect contentBounds)
Parameters:contentBoundsRectReturns:

Rect

Deserializes the serialization info in this diagram entity.

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

A SerializationInfo instance.

Overrides: RadDiagramShapeBase.Deserialize(SerializationInfo)

Implements: ISerializable.Deserialize(SerializationInfo)

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

C#
public void FitToChildren()

Implements: IContainerShape.FitToChildren()

Gets the parent container, if any.

C#
public static RadDiagramContainerShape GetParentContainer(DependencyObject obj)
Parameters:objDependencyObject

An object which sits possibly in a container.

Returns:

RadDiagramContainerShape

Initializes the specified service locator and parent graph.

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

The service locator.

graphIGraphInternal

The diagram control.

Overrides: RadDiagramItem.Initialize(IGraphServiceLocator, IGraphInternal)

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

Overrides: RadDiagramShapeBase.OnApplyTemplate()

Called when [child bounds changed].

C#
protected virtual void OnChildBoundsChanged(IDiagramItem diagramItem)
Parameters:diagramItemIDiagramItem

The diagram item.

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

C#
protected virtual void OnContainerItemsDeserialized()

Creates a peer associated with this object.

C#
protected override AutomationPeer OnCreateAutomationPeer()
Returns:

AutomationPeer

An instance of the .

Overrides: RadDiagramItem.OnCreateAutomationPeer()

Called on drag enter.

C#
protected virtual void OnDragEnter(DragItemsEventArgs args)
Parameters:argsDragItemsEventArgs

Called on drag leave.

C#
protected virtual void OnDragLeave(DragItemsEventArgs args)
Parameters:argsDragItemsEventArgs

The DragItemsEventArgs instance containing the event data.

Called on drop.

C#
protected virtual void OnDrop(DragItemsEventArgs args)
Parameters:argsDragItemsEventArgs

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

C#
protected override void OnInitialized(EventArgs e)
Parameters:eEventArgs

The RoutedEventArgs that contains the event data.

Called on is collapsed changed.

C#
protected virtual void OnIsCollapsedChanged(bool newValue, bool oldValue)
Parameters:newValueboololdValuebool

Called when the IsDropEnabled property changed.

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

The old value of the property.

newValuebool

The new value of the property.

Called when the items collection has been altered.

C#
protected virtual void OnItemsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
Parameters:senderobject

The sender.

eNotifyCollectionChangedEventArgs

The NotifyCollectionChangedEventArgs instance containing the event data.

Remarks:

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

Called on drag drop manager drop.

C#
protected virtual void OnManagerDrop(object sender, DragEventArgs e)
Parameters:senderobject

The sender.

eDragEventArgs

The DragEventArgs instance containing the event data.

Called when the position of this container changes.

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

The old position.

newPositionPoint

The new position.

Overrides: RadDiagramShapeBase.OnPositionChanged(Point, Point)

Called when a property value changed.

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

Overrides: RadDiagramItem.OnPropertyChanged(string)

Called when the size changes.

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

The new size.

oldSizeSize

The old size.

Overrides: RadDiagramItem.OnSizeChanged(Size, Size)

Called when the ZIndex changes.

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

The new value.

oldValueint

The old value.

Overrides: RadDiagramItem.OnZIndexChanged(int, int)

Removes item from the Items collection.

C#
protected void RemoveItem(object item)
Parameters:itemobject

Removes items from the Items collection.

C#
protected void RemoveItems(IEnumerable<object> items, bool updateLayout = true)
Parameters:itemsIEnumerable<object>updateLayoutbool

Serializes this instance.

C#
public override SerializationInfo Serialize()
Returns:

SerializationInfo

Overrides: RadDiagramShapeBase.Serialize()

Implements: ISerializable.Serialize()

Updates the children positions on container position change.

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

The old position.

newPositionPoint

The new position.

Events

IsCollapsedChanged

RoutedEventHandler

Occurs when the container IsCollapsed property has changed.

C#
public event RoutedEventHandler IsCollapsedChanged