Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Collapse]Application UI Manager
   [Collapse]Views
    [Expand]Widget View
    [Collapse]WindowsUI View
     [Expand]Getting Started
      Windows UI Guidelines
      Content Containers
      Navigation Bars
      WindowsUI Buttons
      Flyouts
      Search Panel
      Designer
      Hierarchy and Screens
      Navigating Through Containers
     Tabbed View
     Native MDI View
     Document Selector
     Non-Document Mode
    Documents
   [Expand]Deferred Load
   [Expand]Interaction with Dock Panels
   [Expand]Bar and Ribbon Merging
   [Expand]Examples
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Navigating Through Containers

WindowsUIView provides a rich navigation mechanism that provides control over all end-user actions. These actions include obtaining the user's current location and navigation target, and specifying flexible navigation options.

When an end-user navigates within a WindowsUI, the following events occur:

  • WindowsUIView.NavigatedTo - occurs each time an end-user navigates either from a parent Content Container to its child container, or to the main screen within the current container (for example, navigating from one Document within PageGroup to another).
  • WindowsUIView.NavigatedFrom - occurs when an end-user navigates back from a child Content Container to its parent, or from the main container screen within the current container (for example, navigating from the main SlideGroup screen to the 'Overview' screen).

By handling these events, you can determine every aspect of the current navigation process. Events receive NavigationEventArgs objects as parameters with the following properties:

Property Description
BaseNavigationEventArgs.Source Gets a Content Container, which represents the current end-user location.
NavigationEventArgs.Target Obtains the Content Container to which the end-user navigates. Target and Source properties are equal when navigating within the same Container.
NavigationEventArgs.Document The Document to which an end-user navigates.
NavigationEventArgs.NavigationMode Gets the Navigation Mode. Forward for navigating to child Containers, Back for navigating to parent Containers, Refresh for navigating within the same Container, and New for navigating to a newly created Container.
BaseNavigationEventArgs.SourceContextualZoomLevel, NavigationEventArgs.TargetContextualZoomLevel Get the WindowsUIView.ZoomLevel of source and target containers, respectively.
NavigationEventArgs.Tag Used to pass specific data when navigating from a TileContainer. Returns a clicked Tile's tag.
NavigationEventArgs.Parameter Passes specific data when navigating from all other Content Containers

Expanded Tags

You can pass specific content to Content Containers depending on the Tile that was clicked by the end-user. This feature is based on Tile Tags.

Assume you have a WindowsUI application with two screens - a TileContainer screen and a Page screen. TileContainer displays multiple Tiles related to company employees. Clicking any Tile brings you to the Page that contains a User Control with a GridControl. The application hierarchy appears as follows:

For example, the Grid Control displays its data within a LayoutView. To relate the details page with a Tile, handle the WindowsUIView.NavigatedTo event and use its NavigationEventArgs.Tag property. The steps below show the example.

  1. Specify the BaseTile.Tag properties for all your tiles. In this example, Tile Tags contain employee ID information:
  2. The Tile Tag is passed to the WindowsUIView.NavigatedTo event automatically, so you do not need to know which Tile an end-user clicked. The only thing you need to do is apply filter criteria based on the corresponding employee ID:

The following image illustrates the result.

Expanded Parameters

Parameters can pass specific information when navigating from any Content Container except for the TileContainer (in this case, use the approach described in the Tags section).

Let's modify the example above. Assume that the start-up application screen contains a Page container (page1) with a GridControl instead of a TileContainer with Tiles. Double-clicking a grid row takes you to page2, which contains detailed employee information. Both of these containers' documents contain user controls (ucGeneral and ucDetails, respectively).

  1. First, handle the WindowsUIView.NavigatedTo event, and assign the details Page to the NavigationEventArgs.Parameter property.
  2. Next, implement the ISupportNavigation interface and expose its ISupportNavigation.OnNavigatedTo and ISupportNavigation.OnNavigatedFrom methods for both of your user controls. At application start-up, the OnNavigatedTo method for the ucGeneral user control will receive the details page as a parameter from the NavigatedTo event that was handled in the previous step.
  3. Handle the GridView's double click event and call the IBaseViewController.Activate method to navigate to the details page.
  4. Set the ColumnViewOptionsBehavior.Editable property to false, so that you can handle the double-click event. This property is located in the GridView.OptionsBehavior section.
  5. Next, handle the OnNavigatedFrom method for the general page and assign the focused row to the Parameter property. This parameter will be passed to the OnNavigatedTo method of the details page, and you will be able to retrieve any required data and fill the details page. In this example, a simple filter criteria is applied.

See the How To: Pass Specific Data when Navigating Through Containers example for the complete code.

How would you rate this topic?​​​​​​​