Page.DisplayActionSheet 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
DisplayActionSheet(String, String, String, String[]) |
显示本机平台操作工作表,允许应用程序用户从多个按钮中进行选择。 |
DisplayActionSheet(String, String, String, FlowDirection, String[]) |
显示平台操作工作表,允许应用程序用户从多个按钮中进行选择。 |
DisplayActionSheet(String, String, String, String[])
显示本机平台操作工作表,允许应用程序用户从多个按钮中进行选择。
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)
参数
- title
- String
显示的操作工作表的标题。 不得为 null
。
- cancel
- String
要显示在“取消”按钮中的文本。 可以是 null
以隐藏取消操作。
- destruction
- String
要显示在“析构”按钮中的文本。 可以是 null
以隐藏破坏性的选项。
- buttons
- String[]
其他按钮的文本标签。 不得为 null
。
返回
一个可等待任务,显示操作工作表并返回用户按下的按钮的文本。
注解
开发人员应注意,Windows 的行尾 CR-LF 仅适用于 Windows 系统,并且与 iOS 和 Android 不兼容。 这样做的一个特殊后果是,在 CR-LF 之后出现的字符 (例如,在 title.) 可能不会显示在非 Windows 平台上。 开发人员必须为每个目标系统使用正确的行尾。
适用于
DisplayActionSheet(String, String, String, FlowDirection, String[])
显示平台操作工作表,允许应用程序用户从多个按钮中进行选择。
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)
参数
- title
- String
显示的操作工作表的标题。 可以 null
隐藏标题。
- cancel
- String
要显示在“取消”按钮中的文本。 可以为 null 以隐藏 null
操作。
- destruction
- String
要显示在“析构”按钮中的文本。 可以是 null
以隐藏破坏性的选项。
- flowDirection
- FlowDirection
操作表要使用的流方向。
- buttons
- String[]
其他按钮的文本标签。
返回
一个 ,Task它显示操作表,并返回用户按下的按钮的字符串描述文字。
注解
开发人员应注意,Windows 行结尾 CR-LF 仅适用于 Windows 系统,并且与 iOS 和 Android 不兼容。 这样做的一个特别结果是,在 CR-LF 之后出现的字符 (例如,在标题) 可能不会显示在非 Windows 平台上。 开发人员必须为每个目标系统使用正确的行尾。
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈