Windows 8 将下拉菜单添加到Windows 8 Metro(C#)中的设置
我发现如何将命令(看起来像链接)添加到设置:Windows 8 将下拉菜单添加到Windows 8 Metro(C#)中的设置,windows-8,windows-runtime,Windows 8,Windows Runtime,我发现如何将命令(看起来像链接)添加到设置: SettingsPane.GetForCurrentView().CommandsRequested += MainPage_CommandsRequested; void MainPage_CommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args) { var cmd = new Se
SettingsPane.GetForCurrentView().CommandsRequested += MainPage_CommandsRequested;
void MainPage_CommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args)
{
var cmd = new SettingsCommand("feedback", "Send feedback", new Windows.UI.Popups.UICommandInvokedHandler(x =>
{
App.ShowSendFeedback();
}));
args.Request.ApplicationCommands.Clear();
args.Request.ApplicationCommands.Add(cmd);
}
现在,我需要添加语言选择下拉列表设置魅力。如何实现它?您不能将其直接添加到Win8 UI。其想法是将“命令”链接发布到Win8UI中,然后,当它们被单击时,您的应用程序会收到通知。在这一点上,你可以用你想要的任何小部件显示你自己的UI。有关示例,请参见SDK中的任何设置示例。另请参见,其中说明了在选择某个设置时如何显示自定义用户控件 基本上,他将屏幕外的用户控件移动到屏幕上,然后在用户交互完成后再次隐藏它。对我来说这感觉有点像黑客。。。但我想温特现在就在那里