在我的Windows 8应用程序中,我有一个弹出窗口,当单击超级按钮上的链接时会显示该弹出窗口。如何将当前应用程序的可见框架传递给弹出窗口?我想要根据他们调用符号栏和打开设置的位置来显示和做不同的事情。
要创建我的设置弹出窗口,我执行以下操作:
void onCommandsRequested(SettingsPane settingsPane, SettingsPaneCommandsRequestedEventArgs eventArgs)
{
UICommandInvokedHandler handler = new UICommandInvokedHandler(onSettingsCommand);
SettingsCommand generalCommand = new SettingsCommand("SettingId", "Setting", handler);
eventArgs.Request.ApplicationCommands.Add(generalCommand);
}
void onSettingsCommand(IUICommand command)
{
// Create a SettingsFlyout the same dimenssions as the Popup.
MyApp.Common.LayoutAwarePage mypane = new SettingsFlyout;
}发布于 2012-10-27 05:34:23
我认为你可以将当前帧作为DataContext传递给popup。
var popup = new Popup();
popup.DataContext = this;https://stackoverflow.com/questions/13094430
复制相似问题