Back to Devexpress

DiagramItemBoundsChangedEventArgs.OldParent Property

wpf-devexpress-dot-xpf-dot-diagram-dot-diagramitemboundschangedeventargs-4c3dec40.md

latest2.6 KB
Original Source

DiagramItemBoundsChangedEventArgs.OldParent Property

Returns the item’s previous parent.

Namespace : DevExpress.Xpf.Diagram

Assembly : DevExpress.Xpf.Diagram.v25.2.dll

NuGet Package : DevExpress.Wpf.Diagram

Declaration

csharp
public DiagramItem OldParent { get; }
vb
Public ReadOnly Property OldParent As DiagramItem

Property Value

TypeDescription
DiagramItem

A DiagramItem object.

|

Remarks

If the item was contained in a container, the OldParent property returns the DiagramContainer object representing this container. Otherwise, it returns the DevExpress.Xpf.Diagram.DiagramRoot object.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the OldParent property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-generate-diagram-with-grouped-items/VB/DiagramNestedItemsExample/StackLayoutDiagramContainerBehavior.vb#L82

vb
Private Sub OnDiagramItemBoundsChanged(ByVal sender As Object, ByVal e As DiagramItemBoundsChangedEventArgs)
    If Equals(e.NewParent, AssociatedObject) AndAlso (Not Equals(e.OldParent, AssociatedObject)) Then
        AddChild(e.Item, e.NewIndex = 0)

See Also

NewParent

DiagramItemBoundsChangedEventArgs Class

DiagramItemBoundsChangedEventArgs Members

DevExpress.Xpf.Diagram Namespace