Skip to main content

INavigationAware.NavigatedFrom(NavigationEventArgs) Method

Called automatically after an application has successfully navigated from a View that implements the INavigationAware interface.

Namespace: DevExpress.Xpf.WindowsUI.Navigation

Assembly: DevExpress.Xpf.Controls.v24.2.dll

NuGet Package: DevExpress.Wpf.Controls

Declaration

void NavigatedFrom(
    NavigationEventArgs e
)

Parameters

Name Type Description
e NavigationEventArgs

A NavigationEventArgs object that contains event data.

Remarks

INavigationAware is the interface that provides navigation methods for WindowsUI applications. To use these methods, implement the INavigationAware interface for your application screens (Views) as illustrated in the following code:

public partial class MainView : UserControl, DevExpress.Xpf.WindowsUI.Navigation.INavigationAware {
     public MainView() {
         InitializeComponent();
         . . .
     }
 }

After that, implement the INavigationAware methods for your View. To do so, right-click the INavigationAware in Visual Studio and select the ‘Implement Interface’ item from the pop-up menu.

DXWindowsUI - INavitaionAware implementation

Along with the NavigatedFrom method, the INavigationAware.NavigatingFrom and INavigationAware.NavigatedTo method will also be implemented. The NavigatedFrom method is called only if the INavigationAware.NavigatingFrom method’s Cancel parameter does not equal true.

If you do not wish to implement the INavigationAware interface manually, use the NavigationPage object for your application screens instead of standard UserControl objects. See the Navigation topic to learn more.

See Also