Page.DisplayActionSheet Method

Definition

Overloads

DisplayActionSheet(String, String, String, String[])

Displays a native platform action sheet, allowing the application user to choose from several buttons.

DisplayActionSheet(String, String, String, FlowDirection, String[])

Displays a platform action sheet, allowing the application user to choose from several buttons.

DisplayActionSheet(String, String, String, String[])

Displays a native platform action sheet, allowing the application user to choose from several buttons.

public:
 System::Threading::Tasks::Task<System::String ^> ^ DisplayActionSheet(System::String ^ title, System::String ^ cancel, System::String ^ destruction, ... cli::array <System::String ^> ^ buttons);
public System.Threading.Tasks.Task<string> DisplayActionSheet (string title, string cancel, string destruction, params string[] buttons);
member this.DisplayActionSheet : string * string * string * string[] -> System.Threading.Tasks.Task<string>
Public Function DisplayActionSheet (title As String, cancel As String, destruction As String, ParamArray buttons As String()) As Task(Of String)

Parameters

title
String

Title of the displayed action sheet. Must not be null.

cancel
String

Text to be displayed in the 'Cancel' button. Can be null to hide the cancel action.

destruction
String

Text to be displayed in the 'Destruct' button. Can be null to hide the destructive option.

buttons
String[]

Text labels for additional buttons. Must not be null.

Returns

An awaitable Task that displays an action sheet and returns the Text of the button pressed by the user.

Remarks

Developers should be aware that Windows' line endings, CR-LF, only work on Windows systems, and are incompatible with iOS and Android. A particular consequence of this is that characters that appear after a CR-LF, (For example, in the title.) may not be displayed on non-Windows platforms. Developers must use the correct line endings for each of the targeted systems.

Applies to

DisplayActionSheet(String, String, String, FlowDirection, String[])

Displays a platform action sheet, allowing the application user to choose from several buttons.

public:
 System::Threading::Tasks::Task<System::String ^> ^ DisplayActionSheet(System::String ^ title, System::String ^ cancel, System::String ^ destruction, Microsoft::Maui::FlowDirection flowDirection, ... cli::array <System::String ^> ^ buttons);
public System.Threading.Tasks.Task<string> DisplayActionSheet (string title, string cancel, string destruction, Microsoft.Maui.FlowDirection flowDirection, params string[] buttons);
member this.DisplayActionSheet : string * string * string * Microsoft.Maui.FlowDirection * string[] -> System.Threading.Tasks.Task<string>
Public Function DisplayActionSheet (title As String, cancel As String, destruction As String, flowDirection As FlowDirection, ParamArray buttons As String()) As Task(Of String)

Parameters

title
String

Title of the displayed action sheet. Can be null to hide the title.

cancel
String

Text to be displayed in the 'Cancel' button. Can be null to hide the null action.

destruction
String

Text to be displayed in the 'Destruct' button. Can be null to hide the destructive option.

flowDirection
FlowDirection

The flow direction to be used by the action sheet.

buttons
String[]

Text labels for additional buttons.

Returns

A Task that displays an action sheet and returns the string caption of the button pressed by the user.

Remarks

Developers should be aware that Windows line endings, CR-LF, only work on Windows systems, and are incompatible with iOS and Android. A particular consequence of this is that characters that appear after a CR-LF, (For example, in the title) may not be displayed on non-Windows platforms. Developers must use the correct line endings for each of the targeted systems.

Applies to