Let's first look at sina Weibo.
Normally, none of these settings are available. We need to add them ourselves.
SettingsPane. GetForCurrentView (). CommandsRequested + = onCommandsRequested;
Void onSettingsCommand (IUICommand command)
{
SettingsCommand settingsCommand = (SettingsCommand) command;
If (settingsCommand. Label = "read Settings ")
{
This. Frame. Navigate (typeof (ThemePage ));
}
}
Void onCommandsRequested (SettingsPane settingsPane, SettingsPaneCommandsRequestedEventArgs eventArgs)
{
UICommandInvokedHandler handler = new UICommandInvokedHandler (onSettingsCommand );
SettingsCommand generalCommand = new SettingsCommand ("ReadSetting", "Read Settings", handler );
EventArgs. Request. ApplicationCommands. Clear ();
EventArgs. Request. ApplicationCommands. Add (generalCommand );
}
When we exit this page, we may need to clear these settings and then add others.
EventArgs. Request. ApplicationCommands. Clear ();