On Back Button Pressed Method
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Application developers can override this method to provide behavior when the back button is pressed.
protected virtual bool OnBackButtonPressed ();
abstract member OnBackButtonPressed : unit -> bool override this.OnBackButtonPressed : unit -> bool
Whether or not the back navigation was handled by the override.
If you want to handle or cancel the navigation yourself, you can do so in this method and then return true.
Note that this only works on Android and UWP for the hardware back-button. On iOS, this method will never be called because there is no hardware back-button.