The requested page is not available for the requested platform. You are viewing the content for Default platform.

XafApplication.ViewShown Event

Occurs after a View is shown.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v19.1.dll

Declaration

public event EventHandler<ViewShownEventArgs> ViewShown
Public Event ViewShown As EventHandler(Of ViewShownEventArgs)

Event Data

The ViewShown event handler receives an argument of the ViewShownEventArgs type. The following properties provide information specific to this event.

Property Description
SourceFrame Provides access to the Frame in which a newly created View was requested to be created.
TargetFrame Provides access to the Frame in which a View will be created.

Remarks

In many scenarios, a View is not shown in the Frames, in which the command to show this View has been performed, but in a separate Frames. Let these Frames be called a source Frame and a target Frame. When implementing custom features, you may need to pass some values from the source Frame to the target Frame. For instance, the RecordsNavigationController's PreviousObject and NextObject Actions displayed in a Detail View allows navigating to the previous and next record in the List View from which this Detail View has been shown. Here, the target Frame (the Frame with the Detail View) obtains information on the order of objects in the source Frame (the Frame with the List View).

To implement such feature where you need to exchange data between the source and target Frames, handle the XafApplication.ViewShowing and ViewShown events. The former event is raised before showing a View in the target Frame, the latter - after showing this View. To access the source and target Frames, use the handler's parameters. In addition, the XafApplication.ViewShowing event handler provides the ViewShowingEventArgs.View parameter.

See Also