ISupportNavigation.OnNavigatedFrom(INavigationArgs) Method
Allows you to pass the required information to the ISupportNavigation.OnNavigatedTo method when navigating from the one Content Container to another.
Namespace: DevExpress.XtraBars.Docking2010.Views.WindowsUI
Assembly: DevExpress.XtraBars.v24.1.dll
NuGet Package: DevExpress.Win.Navigation
Declaration
Parameters
Name | Type | Description |
---|---|---|
args | DevExpress.XtraBars.Docking2010.Views.WindowsUI.INavigationArgs | An INavigationArgs object that stores data related to the current navigation process. |
Remarks
You can pass specific information when navigating through a Content Containers. To do so, implement the ISupportNavigation interface for your Documents’ content. After you have implemented the interface methods, use the OnNavigatedFrom method to assign required data to the Parameter property. This data will be passed to the ISupportNavigation.OnNavigatedTo method for the control to which an end-user navigates. For example, the following code passes the selected GridControl row from userControl1 to userControl2 when navigating.
//userControl1
public partial class userControl1 : UserControl, ISupportNavigation {
. . .
public void OnNavigatedFrom(INavigationArgs args) {
args.Parameter = gridView1.GetDataRow(gridView1.FocusedRowHandle);
}
}
//userControl2
public partial class userControl2 : UserControl, ISupportNavigation {
. . .
public void OnNavigatedTo(INavigationArgs args) {
//do something with args.Parameter
}
}
See the Application Hierarchy and Module Navigation topic for the details.