Back to Devexpress

NestedFrame.ViewItem Property

expressappframework-devexpress-dot-expressapp-dot-nestedframe.md

latest1.8 KB
Original Source

NestedFrame.ViewItem Property

Provides access to the View Item that uses the NestedFrame.

Namespace : DevExpress.ExpressApp

Assembly : DevExpress.ExpressApp.v25.2.dll

NuGet Package : DevExpress.ExpressApp

Declaration

csharp
public ViewItem ViewItem { get; }
vb
Public ReadOnly Property ViewItem As ViewItem

Property Value

TypeDescription
ViewItem

A ViewItem that uses the nested Frame.

|

Remarks

You can use this property to access the parent View and its object from a Controller activated for the nested Frame.

csharp
public partial class MyViewController : ViewController {
    protected override void OnActivated() {
        base.OnActivated();
        NestedFrame nestedFrame = Frame as NestedFrame;
        if (nestedFrame != null) {
            View parentView = nestedFrame.ViewItem.View;
            Object parentObject = parentView.CurrentObject;
        }
    }
}

See Also

NestedFrame Class

NestedFrame Members

DevExpress.ExpressApp Namespace