Table of Contents

Closing

This rule is triggered before the view is closed. This occurs when :

  • the user closes the view
  • calling the CloseAsync method
Warning

This event rule is not triggered when the user closes the web browser tab or the web browser.

It can be used, for example, to cancel changes or controlling the closing confirmation message that appear when there is unsaved data.

Arguments

The Arguments property provides the following options.

Name Type Description
Cancel bool If set to true, the navigation will be canceled.
DisplayUnsavedChangesMessage bool If set to false, the unsaved changes message is not displayed.
Result NavigationResult Result of the navigation. If the view was has been opened by code using the NavigateAsync method, this result is passed as an argument of the Callback function that can be set in the NavigationOptions.

Item versus DatasourceCurrent

This rule is not tied to a particular item so it does not offer an Item property.
DatasourceCurrent refers to item at the current position in the datasource.

To know more on the difference between the Item and DatasourceCurrent properties in an UI view event rule, you can check this article.