Navigation in a canvas app refers to the ability to move between screens or views within an app. Canvas apps offer several ways to navigate between screens, including buttons, links, and menus. Here are some common methods for navigating between screens in a canvas app:
- Using buttons: You can create buttons on a screen and set their OnSelect property to navigate to another screen. For example, you can add a button to a Home screen with the formula:
Navigate(DetailsScreen)
This formula navigates to the DetailsScreen when the button is clicked. - Using links: You can create links in text or labels and set their OnSelect property to navigate to another screen. For example, you can add a label to a Home screen with the formula:
Navigate(DetailsScreen)
This formula navigates to the DetailsScreen when the label is clicked. - Using menus: You can create menus on a screen and set their OnSelect property to navigate to another screen. For example, you can add a menu to a Home screen with the formula:
Navigate(DetailsScreen)
This formula navigates to the DetailsScreen when a menu item is selected. - Using tabs: You can create tabs at the top or bottom of a screen and set their OnSelect property to navigate to another screen. For example, you can add tabs to a Home screen with the formula:
Navigate(DetailsScreen)
This formula navigates to the DetailsScreen when a tab is selected. - Using forms: You can create forms that allow the user to edit or view data, and set their OnSuccess property to navigate to another screen. For example, you can add a form to a Details screen with the formula:
Navigate(HomeScreen)
This formula navigates back to the HomeScreen when the form is successfully saved.
When navigating between screens in a canvas app, you can also specify transition effects, such as Fade, Cover, and Uncover.
For example, you can navigate to a Details screen with a Fade transition effect using the formula:
Navigate(DetailsScreen, ScreenTransition.Fade)
This formula navigates to the DetailsScreen and applies a Fade transition effect.
Note that navigation in canvas apps may also involve passing data between screens, which can be done using context variables, query parameters, or global variables.