实现设置魅力栏。关注 Michael Hauck 的 NuGet charmsflyout 库。
成功:“关于”按钮或链接显示在设置魅力中。然而 -
问题:单击“关于”后设置窗格消失
private void CommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args)
{
var cmd = new SettingsCommand("about", "About This App", new Windows.UI.Popups.UICommandInvokedHandler(x =>
{
cfoSettings.IsOpen = true; // guessin problem is here??
}));
args.Request.ApplicationCommands.Add(cmd);
SettingsPane.Show();
}
Xml代码:
<cfo:CharmFlyout
x:Name="cfoSettings"
Heading="My Flyout"
HeadingBackgroundBrush="#FF4E0000">
<StackPanel>
<TextBlock
FontSize="16">CharmFlyout by John Michael Hauck</TextBlock>
<TextBlock
FontSize="16">For support:</TextBlock>
</StackPanel>
</cfo:CharmFlyout>