私の 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;
}