ClassRadDiagramContainerShape
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
RadDiagramContainerShape()
Initializes a new instance of the RadDiagramContainerShape class.
Declaration
public RadDiagramContainerShape()
Fields
CollapsedContentProperty
Identifies the CollapsedContentProperty dependency property.
Declaration
public static readonly DependencyProperty CollapsedContentProperty
Field Value
DependencyProperty
CollapsedContentTemplateProperty
Identifies the CollapsedContentTemplateProperty dependency property.
Declaration
public static readonly DependencyProperty CollapsedContentTemplateProperty
Field Value
DependencyProperty
IsCollapsedChangedEvent
Identifies the IsCollapsedChanged routed event.
Declaration
public static readonly RoutedEvent IsCollapsedChangedEvent
Field Value
RoutedEvent
IsCollapsedProperty
Identifies the IsCollapsedProperty dependency property.
Declaration
public static readonly DependencyProperty IsCollapsedProperty
Field Value
DependencyProperty
IsCollapsibleProperty
Identifies the IsCollapsibleProperty dependency property.
Declaration
public static readonly DependencyProperty IsCollapsibleProperty
Field Value
DependencyProperty
IsDropEnabledProperty
Identifies the IsDropEnabled dependency property.
Declaration
public static readonly DependencyProperty IsDropEnabledProperty
Field Value
DependencyProperty
ItemsProperty
Identifies the Items dependency property.
Declaration
public static readonly DependencyProperty ItemsProperty
Field Value
DependencyProperty
ItemsSourceProperty
Identifies the ItemsSource dependency property.
Declaration
public static readonly DependencyProperty ItemsSourceProperty
Field Value
DependencyProperty
Properties
Children
Gets the children.
Declaration
public IEnumerable<IDiagramItem> Children { get; }
Property Value
Implements
CollapsedContent
Gets or sets the content of the collapsed state placeholder of the container.
Declaration
public object CollapsedContent { get; set; }
Property Value
The content.
CollapsedContentTemplate
Gets or sets the content template of the collapsed state placeholder of the container.
Declaration
public DataTemplate CollapsedContentTemplate { get; set; }
Property Value
DataTemplate
The content.
ContentBounds
Gets or sets the content bounds.
Declaration
public Rect ContentBounds { get; set; }
Property Value
Rect
Implements
IsCollapsed
Gets or sets a value indicating whether this item is collapsed.
IsCollapsible
Gets or sets a value indicating whether this container is collapsible.
Declaration
public bool IsCollapsible { get; set; }
Property Value
True if this instance is collapsible; otherwise, false.
Implements
IsDropEnabled
Gets or sets whether drag-drop new items or removing items is enabled.
IsDropPossible
Gets a value indicating whether drop operation is possible.
Items
Gets the items contained in this visual container.
Declaration
public DiagramItemCollection Items { get; }
Property Value
Implements
ItemsSource
Gets or sets the items source for this container.
Declaration
public IEnumerable ItemsSource { get; set; }
Property Value
Implements
MinBounds
Gets the min bounds.
Declaration
public Rect MinBounds { get; set; }
Property Value
Rect
The min bounds.
Implements
Methods
AddItem(object, Point?)
Adds item to the Items collection.
Declaration
protected void AddItem(object item, Point? position = null)
Parameters
item
position
Point?
AddItems(IEnumerable<object>, bool)
Adds items to the Items collection.
Declaration
protected void AddItems(IEnumerable<object> items, bool updateLayout = true)
Parameters
items
updateLayout
CalculateContentBounds(Rect)
Calculates the content bounds from the given shape bounds.
Declaration
protected virtual Rect CalculateContentBounds(Rect newShapeBounds)
Parameters
newShapeBounds
Rect
Returns
Rect
CalculateMinShapeBounds()
Calculates the minimum shape bounds.
Declaration
protected virtual Rect CalculateMinShapeBounds()
Returns
Rect
CalculateShapeBounds(Rect)
Calculates the shape bounds from the given content bounds.
Declaration
protected virtual Rect CalculateShapeBounds(Rect contentBounds)
Parameters
contentBounds
Rect
Returns
Rect
Deserialize(SerializationInfo)
Deserializes the serialization info in this diagram entity.
Declaration
public override void Deserialize(SerializationInfo info)
Parameters
info
A SerializationInfo instance.
Overrides
Implements
FitToChildren()
Fits the size of the container to its children bounding box.
Declaration
public void FitToChildren()
Implements
GetParentContainer(DependencyObject)
Gets the parent container, if any.
Declaration
public static RadDiagramContainerShape GetParentContainer(DependencyObject obj)
Parameters
obj
DependencyObject
An object which sits possibly in a container.
Returns
Initialize(IGraphServiceLocator, IGraphInternal)
Initializes the specified service locator and parent graph.
Declaration
protected override void Initialize(IGraphServiceLocator serviceLocator, IGraphInternal graph)
Parameters
serviceLocator
The service locator.
graph
The diagram control.
Overrides
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
public override void OnApplyTemplate()
Overrides
OnChildBoundsChanged(IDiagramItem)
Called when [child bounds changed].
Declaration
protected virtual void OnChildBoundsChanged(IDiagramItem diagramItem)
Parameters
diagramItem
The diagram item.
OnContainerItemsDeserialized()
Called when the items in the containers have been deserialized and added to the Items collection.
Declaration
protected virtual void OnContainerItemsDeserialized()
OnCreateAutomationPeer()
Creates a peer associated with this object.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
AutomationPeer
An instance of the .
Overrides
OnDragEnter(DragItemsEventArgs)
Called on drag enter.
Declaration
protected virtual void OnDragEnter(DragItemsEventArgs args)
Parameters
args
OnDragLeave(DragItemsEventArgs)
Called on drag leave.
Declaration
protected virtual void OnDragLeave(DragItemsEventArgs args)
Parameters
args
The DragItemsEventArgs instance containing the event data.
OnDrop(DragItemsEventArgs)
Called on drop.
Declaration
protected virtual void OnDrop(DragItemsEventArgs args)
Parameters
args
OnInitialized(EventArgs)
Raises the event. This method is invoked whenever is set to true internally.
Declaration
protected override void OnInitialized(EventArgs e)
Parameters
e
The RoutedEventArgs that contains the event data.
OnIsCollapsedChanged(bool, bool)
Called on is collapsed changed.
OnIsDropEnabledPropertyChanged(bool, bool)
Called when the IsDropEnabled property changed.
OnItemsCollectionChanged(object, NotifyCollectionChangedEventArgs)
Called when the items collection has been altered.
Declaration
protected virtual void OnItemsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
Parameters
sender
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
protected virtual void OnManagerDrop(object sender, DragEventArgs e)
Parameters
sender
The sender.
e
The DragEventArgs instance containing the event data.
OnPositionChanged(Point, Point)
Called when the position of this container changes.
Declaration
protected override void OnPositionChanged(Point oldPosition, Point newPosition)
Parameters
oldPosition
Point
The old position.
newPosition
Point
The new position.
Overrides
OnPropertyChanged(string)
Called when a property value changed.
Declaration
protected override void OnPropertyChanged(string propertyName)
Parameters
propertyName
Overrides
OnSizeChanged(Size, Size)
Called when the size changes.
Declaration
protected override void OnSizeChanged(Size newSize, Size oldSize)
Parameters
newSize
Size
The new size.
oldSize
Size
The old size.
Overrides
OnZIndexChanged(int, int)
Called when the ZIndex changes.
RemoveItem(object)
Removes item from the Items collection.
RemoveItems(IEnumerable<object>, bool)
Removes items from the Items collection.
Declaration
protected void RemoveItems(IEnumerable<object> items, bool updateLayout = true)
Parameters
items
updateLayout
Serialize()
Serializes this instance.
Declaration
public override SerializationInfo Serialize()
Returns
Overrides
Implements
UpdateChildrenPositions(Point, Point)
Updates the children positions on container position change.
Declaration
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
public event RoutedEventHandler IsCollapsedChanged
Event Value
RoutedEventHandler