1
我正在使用Windows默認設置彈出窗口添加一些自定義命令。但是現在我需要打開一個本地存儲的HTML文件?我怎樣才能做到這一點 ?我想從app.xaml.cs動我彈出代碼的App.xaml 任何幫助 第二件事可以理解 下面是我的代碼:如何在彈出窗口中打開本地存儲的html文件?
protected override void OnInitialize(IActivatedEventArgs args){
SettingsPane.GetForCurrentView()CommandsRequested + = App_CommandsRequested; }
void App_CommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args)
{
SettingsCommand settingsCommand = new SettingsCommand(
"About",
"About",
command =>
{
var flyout = new SettingsFlyout();
flyout.Title = "About";
string file = "ms-appx-web:///assets/about/about.html";
flyout.Show();
}
);
args.Request.ApplicationCommands.Add(settingsCommand);
}