通过使用Callisto
,我编写了一个添加设置魅力的代码。
下面我附上一个:
// Register handler for CommandsRequested events from the setting pane
SettingsPane.GetForCurrentView().CommandsRequested += OnCommandsRequested;
void OnCommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args)
{
// Add an Adding Feeds command
var add = new SettingsCommand("add", "Add new Feed", (handler) =>
{
var settings = new SettingsFlyout();
settings.Content = new AddingPageUserControl();
settings.HeaderBrush = (SolidColorBrush)Application.Current.Resources["UserControlBackgraund"];
settings.Background = (SolidColorBrush)Application.Current.Resources["UserControlBackgraund"];
settings.HeaderText = "Add new Feed";
settings.IsOpen = true;
});
args.Request.ApplicationCommands.Add(add);
}
而且我不知道如何创建一个按钮,在AppBar
该按钮中打开与我用来通过设置超级按钮打开它相同的设置弹出按钮。我的问题是:如果是的话,是否可以创建它我需要某种提示。