Class RadDiagramContainerShape
A shape which holds other shapes much like an items container.
Inherited Members
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.Diagrams.dll
Syntax
[TelerikToolboxCategory("Diagram")]
[Themable]
public class RadDiagramContainerShape : RadDiagramShapeBase, IContainerShape, IShape, IDiagramItem, ISerializable, ISupportMouseOver, IPropertyChanged, IGroupable, ISupportManipulation, ISupportVirtualization, IContainerChild, ISupportRotation, IDragDropAware, ICollapsible, IThemable
Remarks
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
System.Windows.DependencyProperty
|
CollapsedContentTemplateProperty
Identifies the CollapsedContentTemplateProperty dependency property.
Declaration
public static readonly DependencyProperty CollapsedContentTemplateProperty
Field Value
System.Windows.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
System.Windows.DependencyProperty
|
IsCollapsibleProperty
Identifies the IsCollapsibleProperty dependency property.
Declaration
public static readonly DependencyProperty IsCollapsibleProperty
Field Value
System.Windows.DependencyProperty
|
IsDropEnabledProperty
Identifies the IsDropEnabled dependency property.
Declaration
public static readonly DependencyProperty IsDropEnabledProperty
Field Value
System.Windows.DependencyProperty
|
ItemsProperty
Identifies the Items dependency property.
Declaration
public static readonly DependencyProperty ItemsProperty
Field Value
System.Windows.DependencyProperty
|
ItemsSourceProperty
Identifies the ItemsSource dependency property.
Declaration
public static readonly DependencyProperty ItemsSourceProperty
Field Value
System.Windows.DependencyProperty
|
Properties
Children
Gets the children.
Declaration
public IEnumerable<IDiagramItem> Children { get; }
Property Value
System.Collections.Generic.IEnumerable<IDiagramItem>
|
Implements
CollapsedContent
Gets or sets the content of the collapsed state placeholder of the container.
Declaration
public object CollapsedContent { get; set; }
Property Value
System.Object
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
System.Windows.DataTemplate
The content. |
ContentBounds
Gets or sets the content bounds.
Declaration
public Rect ContentBounds { get; set; }
Property Value
System.Windows.Rect
|
Implements
IsCollapsed
Gets or sets a value indicating whether this item is collapsed.
Declaration
public bool IsCollapsed { get; set; }
Property Value
System.Boolean
|
Implements
IsCollapsible
Gets or sets a value indicating whether this container is collapsible.
Declaration
public bool IsCollapsible { get; set; }
Property Value
System.Boolean
|
Implements
IsDropEnabled
Gets or sets whether drag-drop new items or removing items is enabled.
Declaration
public bool IsDropEnabled { get; set; }
Property Value
System.Boolean
|
IsDropPossible
Gets a value indicating whether drop operation is possible.
Declaration
protected virtual bool IsDropPossible { get; }
Property Value
System.Boolean
|
Items
Gets the items contained in this visual container.
Declaration
public DiagramItemCollection Items { get; }
Property Value
DiagramItemCollection
|
Implements
ItemsSource
Gets or sets the items source for this container.
Declaration
public IEnumerable ItemsSource { get; set; }
Property Value
System.Collections.IEnumerable
|
Implements
MinBounds
Gets the min bounds.
Declaration
public Rect MinBounds { get; set; }
Property Value
System.Windows.Rect
The min bounds. |
Implements
Methods
AddItem(Object, Nullable<Point>)
Adds item to the Items collection.
Declaration
protected void AddItem(object item, Nullable<Point> position = null)
Parameters
System.Object
item
|
System.Nullable<System.Windows.Point>
position
|
AddItems(IEnumerable<Object>, Boolean)
Adds items to the Items collection.
Declaration
protected void AddItems(IEnumerable<object> items, bool updateLayout = true)
Parameters
System.Collections.Generic.IEnumerable<System.Object>
items
|
System.Boolean
updateLayout
|
CalculateContentBounds(Rect)
Calculates the content bounds from the given shape bounds.
Declaration
protected virtual Rect CalculateContentBounds(Rect newShapeBounds)
Parameters
System.Windows.Rect
newShapeBounds
|
Returns
System.Windows.Rect
|
CalculateMinShapeBounds()
Calculates the minimum shape bounds.
Declaration
protected virtual Rect CalculateMinShapeBounds()
Returns
System.Windows.Rect
|
CalculateShapeBounds(Rect)
Calculates the shape bounds from the given content bounds.
Declaration
protected virtual Rect CalculateShapeBounds(Rect contentBounds)
Parameters
System.Windows.Rect
contentBounds
|
Returns
System.Windows.Rect
|
Deserialize(SerializationInfo)
Deserializes the serialization info in this diagram entity.
Declaration
public override void Deserialize(SerializationInfo info)
Parameters
SerializationInfo
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
System.Windows.DependencyObject
obj
An object which sits possibly in a container. |
Returns
RadDiagramContainerShape
|
Initialize(IGraphServiceLocator, IGraphInternal)
Initializes the specified service locator and parent graph.
Declaration
protected override void Initialize(IGraphServiceLocator serviceLocator, IGraphInternal graph)
Parameters
IGraphServiceLocator
serviceLocator
The service locator. |
IGraphInternal
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 System.Windows.Controls.Control.ApplyTemplate. 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
IDiagramItem
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 Telerik.Windows.Controls.Diagrams.AutomationPeers.RadDiagramAutomationPeer peer associated with this object.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
System.Windows.Automation.Peers.AutomationPeer
An instance of the Telerik.Windows.Controls.Diagrams.AutomationPeers.RadDiagramAutomationPeer. |
Overrides
OnDragEnter(DragItemsEventArgs)
Called on drag enter.
Declaration
protected virtual void OnDragEnter(DragItemsEventArgs args)
Parameters
DragItemsEventArgs
args
|
OnDragLeave(DragItemsEventArgs)
Called on drag leave.
Declaration
protected virtual void OnDragLeave(DragItemsEventArgs args)
Parameters
DragItemsEventArgs
args
The DragItemsEventArgs instance containing the event data. |
OnDrop(DragItemsEventArgs)
Called on drop.
Declaration
protected virtual void OnDrop(DragItemsEventArgs args)
Parameters
DragItemsEventArgs
args
|
OnIsCollapsedChanged(Boolean, Boolean)
Called on is collapsed changed.
Declaration
protected virtual void OnIsCollapsedChanged(bool newValue, bool oldValue)
Parameters
System.Boolean
newValue
|
System.Boolean
oldValue
|
OnIsDropEnabledPropertyChanged(Boolean, Boolean)
Called when the IsDropEnabled property changed.
Declaration
protected virtual void OnIsDropEnabledPropertyChanged(bool oldValue, bool newValue)
Parameters
System.Boolean
oldValue
The old value of the property. |
System.Boolean
newValue
The new value of the property. |
OnItemsCollectionChanged(Object, NotifyCollectionChangedEventArgs)
Called when the items collection has been altered.
Declaration
protected virtual void OnItemsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
Parameters
System.Object
sender
The sender. |
System.Collections.Specialized.NotifyCollectionChangedEventArgs
e
The System.Collections.Specialized.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
System.Object
sender
The sender. |
DragEventArgs
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
System.Windows.Point
oldPosition
The old position. |
System.Windows.Point
newPosition
The new position. |
Overrides
OnPropertyChanged(String)
Called when a property value changed.
Declaration
protected override void OnPropertyChanged(string propertyName)
Parameters
System.String
propertyName
|
Overrides
OnSizeChanged(Size, Size)
Called when the size changes.
Declaration
protected override void OnSizeChanged(Size newSize, Size oldSize)
Parameters
System.Windows.Size
newSize
The new size. |
System.Windows.Size
oldSize
The old size. |
Overrides
OnZIndexChanged(Int32, Int32)
Called when the ZIndex changes.
Declaration
protected override void OnZIndexChanged(int newValue, int oldValue)
Parameters
System.Int32
newValue
The new value. |
System.Int32
oldValue
The old value. |
Overrides
RemoveItem(Object)
Removes item from the Items collection.
Declaration
protected void RemoveItem(object item)
Parameters
System.Object
item
|
RemoveItems(IEnumerable<Object>, Boolean)
Removes items from the Items collection.
Declaration
protected void RemoveItems(IEnumerable<object> items, bool updateLayout = true)
Parameters
System.Collections.Generic.IEnumerable<System.Object>
items
|
System.Boolean
updateLayout
|
Serialize()
Serializes this instance.
Declaration
public override SerializationInfo Serialize()
Returns
SerializationInfo
|
Overrides
Implements
UpdateChildrenPositions(Point, Point)
Updates the children positions on container position change.
Declaration
protected virtual void UpdateChildrenPositions(Point oldPosition, Point newPosition)
Parameters
System.Windows.Point
oldPosition
The old position. |
System.Windows.Point
newPosition
The new position. |
Events
IsCollapsedChanged
Occurs when the container IsCollapsed property has changed.
Declaration
public event RoutedEventHandler IsCollapsedChanged
Event Type
System.Windows.RoutedEventHandler
|
Explicit Interface Implementations
IContainerShape.AddItem(Object, Nullable<Point>)
Adds item to the Items collection.
Declaration
void IContainerShape.AddItem(object item, Nullable<Point> position)
Parameters
System.Object
item
|
System.Nullable<System.Windows.Point>
position
|
Implements
IContainerShape.AddItems(IEnumerable<Object>)
Adds items to the Items collection.
Declaration
void IContainerShape.AddItems(IEnumerable<object> items)
Parameters
System.Collections.Generic.IEnumerable<System.Object>
items
|
Implements
IContainerShape.OnContainerItemsDeserialized()
Declaration
void IContainerShape.OnContainerItemsDeserialized()
Implements
IContainerShape.RefreshBounds()
IContainerShape.RemoveItem(Object)
Removes item from the Items collection.
Declaration
void IContainerShape.RemoveItem(object item)
Parameters
System.Object
item
|
Implements
IContainerShape.RemoveItems(IEnumerable<Object>)
Removes items from the Items collection.
Declaration
void IContainerShape.RemoveItems(IEnumerable<object> items)
Parameters
System.Collections.Generic.IEnumerable<System.Object>
items
|
Implements
IDiagramItem.get_Content()
Declaration
object IDiagramItem.get_Content()
Returns
System.Object
|
Implements
IDiagramItem.get_IsEnabled()
Declaration
bool IDiagramItem.get_IsEnabled()
Returns
System.Boolean
|
Implements
IDiagramItem.get_Name()
Declaration
string IDiagramItem.get_Name()
Returns
System.String
|
Implements
IDiagramItem.get_RenderTransformOrigin()
Declaration
Point IDiagramItem.get_RenderTransformOrigin()
Returns
System.Windows.Point
|
Implements
IDiagramItem.get_Visibility()
Declaration
Visibility IDiagramItem.get_Visibility()
Returns
System.Windows.Visibility
|
Implements
IDiagramItem.set_Content(Object)
Declaration
void IDiagramItem.set_Content(object value)
Parameters
System.Object
value
|
Implements
IDiagramItem.set_IsEnabled(Boolean)
Declaration
void IDiagramItem.set_IsEnabled(bool value)
Parameters
System.Boolean
value
|
Implements
IDiagramItem.set_Name(String)
Declaration
void IDiagramItem.set_Name(string value)
Parameters
System.String
value
|
Implements
IDiagramItem.set_RenderTransformOrigin(Point)
Declaration
void IDiagramItem.set_RenderTransformOrigin(Point value)
Parameters
System.Windows.Point
value
|
Implements
IDiagramItem.set_Visibility(Visibility)
Declaration
void IDiagramItem.set_Visibility(Visibility value)
Parameters
System.Windows.Visibility
value
|
Implements
IDragDropAware.IsDropPossible
Declaration
bool IDragDropAware.IsDropPossible { get; }
Returns
System.Boolean
|
Implements
IDragDropAware.OnDragEnter(DragItemsEventArgs)
Called on drag enter.
Declaration
void IDragDropAware.OnDragEnter(DragItemsEventArgs args)
Parameters
DragItemsEventArgs
args
|
Implements
IDragDropAware.OnDragLeave(DragItemsEventArgs)
Called on drag leave.
Declaration
void IDragDropAware.OnDragLeave(DragItemsEventArgs args)
Parameters
DragItemsEventArgs
args
|
Implements
IDragDropAware.OnDrop(DragItemsEventArgs)
Called on drop.
Declaration
void IDragDropAware.OnDrop(DragItemsEventArgs args)
Parameters
DragItemsEventArgs
args
|
Implements
IShape.get_Height()
Declaration
double IShape.get_Height()
Returns
System.Double
|
Implements
IShape.get_MaxHeight()
Declaration
double IShape.get_MaxHeight()
Returns
System.Double
|
Implements
IShape.get_MaxWidth()
Declaration
double IShape.get_MaxWidth()
Returns
System.Double
|
Implements
IShape.get_MinHeight()
Declaration
double IShape.get_MinHeight()
Returns
System.Double
|
Implements
IShape.get_MinWidth()
Declaration
double IShape.get_MinWidth()
Returns
System.Double
|
Implements
IShape.get_Width()
Declaration
double IShape.get_Width()
Returns
System.Double
|
Implements
IShape.set_Height(Double)
Declaration
void IShape.set_Height(double value)
Parameters
System.Double
value
|
Implements
IShape.set_MaxHeight(Double)
Declaration
void IShape.set_MaxHeight(double value)
Parameters
System.Double
value
|
Implements
IShape.set_MaxWidth(Double)
Declaration
void IShape.set_MaxWidth(double value)
Parameters
System.Double
value
|
Implements
IShape.set_MinHeight(Double)
Declaration
void IShape.set_MinHeight(double value)
Parameters
System.Double
value
|
Implements
IShape.set_MinWidth(Double)
Declaration
void IShape.set_MinWidth(double value)
Parameters
System.Double
value
|
Implements
IShape.set_Width(Double)
Declaration
void IShape.set_Width(double value)
Parameters
System.Double
value
|