A shape which holds other shapes much like an items container.
Definition
Namespace:Telerik.Windows.Controls
Assembly:Telerik.Windows.Controls.Diagrams.dll
Syntax:
[Themable]
[TelerikToolboxCategory("Diagram")]
public class RadDiagramContainerShape : RadDiagramShapeBase, IContainerShape, IShape, IDiagramItem, ISerializable, ISupportMouseOver, IPropertyChanged, IGroupable, ISupportManipulation, ISupportVirtualization, IContainerChild, ICollapsible, ISupportRotation, IDragDropAware
Inheritance: objectRadDiagramItemRadDiagramShapeBaseRadDiagramContainerShape
Implements:
Inherited Members
Constructors
Initializes a new instance of the RadDiagramContainerShape class.
public RadDiagramContainerShape()
Fields
CollapsedContentProperty
DependencyProperty
Identifies the CollapsedContentProperty dependency property.
public static readonly DependencyProperty CollapsedContentProperty
CollapsedContentTemplateProperty
DependencyProperty
Identifies the CollapsedContentTemplateProperty dependency property.
public static readonly DependencyProperty CollapsedContentTemplateProperty
IsCollapsedChangedEvent
RoutedEvent
Identifies the IsCollapsedChanged routed event.
public static readonly RoutedEvent IsCollapsedChangedEvent
IsCollapsedProperty
DependencyProperty
Identifies the IsCollapsedProperty dependency property.
public static readonly DependencyProperty IsCollapsedProperty
IsCollapsibleProperty
DependencyProperty
Identifies the IsCollapsibleProperty dependency property.
public static readonly DependencyProperty IsCollapsibleProperty
IsDropEnabledProperty
DependencyProperty
Identifies the IsDropEnabled dependency property.
public static readonly DependencyProperty IsDropEnabledProperty
ItemsProperty
DependencyProperty
Identifies the Items dependency property.
public static readonly DependencyProperty ItemsProperty
ItemsSourceProperty
DependencyProperty
Identifies the ItemsSource dependency property.
public static readonly DependencyProperty ItemsSourceProperty
Properties
Gets the children.
public IEnumerable<IDiagramItem> Children { get; }
Implements:
Gets or sets the content of the collapsed state placeholder of the container.
public object CollapsedContent { get; set; }
The content.
CollapsedContentTemplate
DataTemplate
Gets or sets the content template of the collapsed state placeholder of the container.
public DataTemplate CollapsedContentTemplate { get; set; }
The content.
ContentBounds
Rect
Gets or sets the content bounds.
public Rect ContentBounds { get; set; }
Implements:
Gets or sets a value indicating whether this item is collapsed.
public bool IsCollapsed { get; set; }
Implements:
Gets or sets a value indicating whether this container is collapsible.
public bool IsCollapsible { get; set; }
True if this instance is collapsible; otherwise, false.
Implements:
Gets or sets whether drag-drop new items or removing items is enabled.
public bool IsDropEnabled { get; set; }
Gets a value indicating whether drop operation is possible.
protected virtual bool IsDropPossible { get; }
Gets the items contained in this visual container.
public DiagramItemCollection Items { get; }
Implements:
Gets or sets the items source for this container.
public IEnumerable ItemsSource { get; set; }
Implements:
MinBounds
Rect
Gets the min bounds.
public Rect MinBounds { get; set; }
The min bounds.
Implements:
Methods
Adds item to the Items collection.
Adds items to the Items collection.
protected void AddItems(IEnumerable<object> items, bool updateLayout = true)
Calculates the content bounds from the given shape bounds.
protected virtual Rect CalculateContentBounds(Rect newShapeBounds)
Rect
Calculates the minimum shape bounds.
protected virtual Rect CalculateMinShapeBounds()
Rect
Calculates the shape bounds from the given content bounds.
protected virtual Rect CalculateShapeBounds(Rect contentBounds)
Rect
Deserializes the serialization info in this diagram entity.
public override void Deserialize(SerializationInfo info)
A SerializationInfo instance.
Overrides:
Implements:
Fits the size of the container to its children bounding box.
public void FitToChildren()
Implements:
Gets the parent container, if any.
public static RadDiagramContainerShape GetParentContainer(DependencyObject obj)
An object which sits possibly in a container.
Returns:Initializes the specified service locator and parent graph.
protected override void Initialize(IGraphServiceLocator serviceLocator, IGraphInternal graph)
The service locator.
graphIGraphInternalThe diagram control.
Overrides:
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.
public override void OnApplyTemplate()
Overrides:
Called when [child bounds changed].
protected virtual void OnChildBoundsChanged(IDiagramItem diagramItem)
The diagram item.
Called when the items in the containers have been deserialized and added to the Items collection.
protected virtual void OnContainerItemsDeserialized()
OnCreateAutomationPeer()
AutomationPeer
Creates a peer associated with this object.
protected override AutomationPeer OnCreateAutomationPeer()
AutomationPeer
An instance of the .
Overrides:
Called on drag enter.
Called on drag leave.
protected virtual void OnDragLeave(DragItemsEventArgs args)
The DragItemsEventArgs instance containing the event data.
Called on drop.
Raises the event. This method is invoked whenever is set to true internally.
protected override void OnInitialized(EventArgs e)
The RoutedEventArgs that contains the event data.
Called when the IsDropEnabled property changed.
Called when the items collection has been altered.
protected virtual void OnItemsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
The sender.
eNotifyCollectionChangedEventArgsThe NotifyCollectionChangedEventArgs instance containing the event data.
Note that the items are not necessarily shapes, but can be arbitrary objects.
Called on drag drop manager drop.
protected virtual void OnManagerDrop(object sender, DragEventArgs e)
The sender.
eDragEventArgsThe DragEventArgs instance containing the event data.
Called when the position of this container changes.
protected override void OnPositionChanged(Point oldPosition, Point newPosition)
The old position.
newPositionPointThe new position.
Overrides:
Called when a property value changed.
protected override void OnPropertyChanged(string propertyName)
Overrides:
Called when the size changes.
protected override void OnSizeChanged(Size newSize, Size oldSize)
The new size.
oldSizeSizeThe old size.
Overrides:
Removes item from the Items collection.
Removes items from the Items collection.
protected void RemoveItems(IEnumerable<object> items, bool updateLayout = true)
Serializes this instance.
Updates the children positions on container position change.
protected virtual void UpdateChildrenPositions(Point oldPosition, Point newPosition)
The old position.
newPositionPointThe new position.
Events
IsCollapsedChanged
RoutedEventHandler
Occurs when the container IsCollapsed property has changed.
public event RoutedEventHandler IsCollapsedChanged