我找到了解決方案,我想分享,如果它可以幫助別人。
<ContentPage.ToolbarItems>
<ToolbarItem Order="Secondary" Priority="1" Name="Approval Now" />
<ToolbarItem Order="Secondary" Priority="1" Name="Tasks - Future" />
<ToolbarItem Order="Secondary" Priority="1" Name="Meeting - Future" />
<ToolbarItem Order="Primary" Priority="1" Name="sort" Clicked="sort_click" />
</ContentPage.ToolbarItems>
在xaml.cs
private async void sort_click(object sender, EventArgs e)
{
//string StorageFolder = await Application.Current.MainPage.DisplayActionSheet(SystemMessages.PhothotoSaveFolder, "Cancel", null, SystemMessages.InstallationPhothoto, SystemMessages.SerialNumbers);
var action = await DisplayActionSheet("Sort Options", "Cancel", null, "By Approval Due Date", "Meeting Date", "Meeting Type");
Debug.WriteLine("Action: " + action);
}