Beispiel #1
0
        private void PopulateCommandBar()
        {
            PageService?.AddCommandBarButton(CommandBarButton.Separator);

            // Add page settings button
            PageService?.AddCommandBarButton(PageUtil.CreatePageSettingCommandBarButton(
                                                 PageService,
                                                 new WeatherSettingsControl
            {
                Width      = Constants.DefaultSidePaneContentWidth,
                Background = new SolidColorBrush(Colors.Transparent),
            },
                                                 Common.GetLocalizedText("WeatherSettingHeader/Text")));
            PageService?.AddCommandBarButton(CommandBarButton.Separator);

            // Add refresh button
            PageService?.AddCommandBarButton(new CommandBarButton
            {
                Icon    = new SymbolIcon(Symbol.Refresh),
                Label   = Common.GetLocalizedText("RefreshButton"),
                Handler = async(s, e) =>
                {
                    await RefreshWeatherAsync();
                },
            });
        }
 private void PopulateCommandBar()
 {
     PageService?.AddCommandBarButton(CommandBarButton.Separator);
     PageService?.AddCommandBarButton(PageUtil.CreatePageSettingCommandBarButton(
                                          PageService,
                                          new TileSettingsControl
     {
         Width      = Constants.DefaultSidePaneContentWidth,
         Background = new SolidColorBrush(Colors.Transparent),
     },
                                          Common.GetLocalizedText("TileSettingHeader/Text")));
 }