Bagikan melalui


Shell.SetBackButtonBehavior(BindableObject, BackButtonBehavior) Method

Definition

Sets the back button behavior when the given obj is presented.

public:
 static void SetBackButtonBehavior(Microsoft::Maui::Controls::BindableObject ^ obj, Microsoft::Maui::Controls::BackButtonBehavior ^ behavior);
public static void SetBackButtonBehavior (Microsoft.Maui.Controls.BindableObject obj, Microsoft.Maui.Controls.BackButtonBehavior behavior);
static member SetBackButtonBehavior : Microsoft.Maui.Controls.BindableObject * Microsoft.Maui.Controls.BackButtonBehavior -> unit
Public Shared Sub SetBackButtonBehavior (obj As BindableObject, behavior As BackButtonBehavior)

Parameters

obj
BindableObject

The page that dictates the Shell's back button behavior when active.

behavior
BackButtonBehavior

The back button behavior.

Remarks

If the obj is not a page, this property won't do anything.

Applies to