private void SettingsPane_CommandsRequested(Windows.UI.ApplicationSettings.SettingsPane sender, Windows.UI.ApplicationSettings.SettingsPaneCommandsRequestedEventArgs args) { foreach(SettingsCommand cmd in OnCommandsRequested()) { #pragma warning disable 618 args.Request.ApplicationCommands.Add(new Windows.UI.ApplicationSettings.SettingsCommand(cmd.Id, cmd.Label, new Windows.UI.Popups.UICommandInvokedHandler((c)=> { SettingsCommand sc = new SettingsCommand(c.Id, c.Label, cmd.Invoked ); sc.Invoked.Invoke(sc); }))); } #if WINDOWS_UWP // add missing 8.1 commands #if DEBUG if(true) #else if(!Package.Current.IsDevelopmentMode) #endif { #pragma warning disable 618 args.Request.ApplicationCommands.Add(new Windows.UI.ApplicationSettings.SettingsCommand("rateAndReview", "Rate and review", async (c) => { await InTheHand.ApplicationModel.Store.CurrentApp.RequestReviewAsync(); })); #pragma warning disable 618 args.Request.ApplicationCommands.Add(new Windows.UI.ApplicationSettings.SettingsCommand("privacyPolicy", "Privacy policy", async (c) => { await InTheHand.ApplicationModel.Store.CurrentApp.RequestDetailsAsync(); })); } #endif /*if (showAbout) { args.Request.ApplicationCommands.Add(new Windows.UI.ApplicationSettings.SettingsCommand("about", "About", (c) => { SettingsFlyout flyout = new SettingsFlyout(); flyout.Title = "About"; //flyout.IconSource = new BitmapImage(InTheHand.ApplicationModel.Package.Current.Logo); flyout.Content = new InTheHandUI.AboutView(); flyout.Show(); })); }*/ }
private void SettingsPane_CommandsRequested(Windows.UI.ApplicationSettings.SettingsPane sender, Windows.UI.ApplicationSettings.SettingsPaneCommandsRequestedEventArgs args) { foreach (SettingsCommand cmd in OnCommandsRequested()) { #pragma warning disable 618 args.Request.ApplicationCommands.Add(new Windows.UI.ApplicationSettings.SettingsCommand(cmd.Id, cmd.Label, new Windows.UI.Popups.UICommandInvokedHandler((c) => { SettingsCommand sc = new SettingsCommand(c.Id, c.Label, cmd.Invoked); sc.Invoked.Invoke(sc); }))); } #if WINDOWS_UWP // add missing 8.1 commands #if DEBUG if (true) #else if (!Package.Current.IsDevelopmentMode) #endif { #pragma warning disable 618 args.Request.ApplicationCommands.Add(new Windows.UI.ApplicationSettings.SettingsCommand("rateAndReview", "Rate and review", async(c) => { await InTheHand.ApplicationModel.Store.CurrentApp.RequestReviewAsync(); })); #pragma warning disable 618 args.Request.ApplicationCommands.Add(new Windows.UI.ApplicationSettings.SettingsCommand("privacyPolicy", "Privacy policy", async(c) => { await InTheHand.ApplicationModel.Store.CurrentApp.RequestDetailsAsync(); })); } #endif /*if (showAbout) * { * args.Request.ApplicationCommands.Add(new Windows.UI.ApplicationSettings.SettingsCommand("about", "About", (c) => * { * SettingsFlyout flyout = new SettingsFlyout(); * flyout.Title = "About"; * //flyout.IconSource = new BitmapImage(InTheHand.ApplicationModel.Package.Current.Logo); * flyout.Content = new InTheHandUI.AboutView(); * flyout.Show(); * })); * }*/ }