다음을 통해 공유


Page.DisplayActionSheet(String, String, String, String[]) Method

Definition

Displays a native platform action sheet, allowing the application user to choose from several 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>

Parameters

title
System.String

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

cancel
System.String

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

destruction
System.String

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

buttons
System.String[]

Text labels for additional buttons. Must not be null.

Returns

System.Threading.Tasks.Task<System.String>

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