• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Shell.ApplicationBar类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Microsoft.Phone.Shell.ApplicationBar的典型用法代码示例。如果您正苦于以下问题:C# ApplicationBar类的具体用法?C# ApplicationBar怎么用?C# ApplicationBar使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ApplicationBar类属于Microsoft.Phone.Shell命名空间,在下文中一共展示了ApplicationBar类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: hideAppBar

        public void hideAppBar(string jsonArgs)
        {
            try
            {
                //var items = JsonHelper.Deserialize<string[]>(jsonArgs);

                Deployment.Current.Dispatcher.BeginInvoke(() =>
                    {
                        PhoneApplicationFrame frame = Application.Current.RootVisual as PhoneApplicationFrame;
                        if (frame != null)
                        {
                            PhoneApplicationPage page = frame.Content as PhoneApplicationPage;
                            if (page != null)
                            {
                                ApplicationBar bar = new ApplicationBar();
                                bar.Mode = ApplicationBarMode.Minimized;
                                bar.Opacity = 0;
                                bar.IsVisible = false;
                                bar.IsMenuEnabled = false;

                                page.ApplicationBar = bar;
                                // page.ApplicationBar.IsVisible = false;
                            }
                        }
                    });
                DispatchCommandResult(new PluginResult(PluginResult.Status.OK, ""));
            }
            catch (Exception ex)
            {
                DispatchCommandResult(new PluginResult(PluginResult.Status.ERROR, ex.Message));
            }
        }
开发者ID:palmsnipe,项目名称:cordova-plugin-canvassharing,代码行数:32,代码来源:CanvasSharing.cs


示例2: MainPage

        // Constructor
        public MainPage()
        {
            InitializeComponent();
            startTime = DateTime.Now;
            if (Debugger.IsAttached)
            {
                DebugPanel.Visibility = Visibility.Visible;

                ApplicationBar = new ApplicationBar();
                ApplicationBar.Mode = ApplicationBarMode.Minimized;
                ApplicationBar.Opacity = 1.0;
                ApplicationBar.IsVisible = true;
                ApplicationBar.IsMenuEnabled = true;

                // Adding a menu item
                ApplicationBarMenuItem myMenuItem = new ApplicationBarMenuItem();
                myMenuItem.Text = "open debugger";
                myMenuItem.Click += toggleDebugger;
                ApplicationBar.MenuItems.Add(myMenuItem);
                // Adding a menu item
                ApplicationBarMenuItem minDebugger = new ApplicationBarMenuItem();
                minDebugger.Text = "minimize debugger";
                minDebugger.Click += minDebug;
                ApplicationBar.MenuItems.Add(minDebugger);
            }
        }
开发者ID:matthiasxc,项目名称:WP8-HTML-Tutorials,代码行数:27,代码来源:MainPage.xaml.cs


示例3: MainPage

        // Constructor
        public MainPage()
        {
            InitializeComponent();

            // Add an Application Bar with a 'setting menu item.
            ApplicationBar = new ApplicationBar();
            ApplicationBar.IsMenuEnabled = true;
            ApplicationBar.IsVisible = true;
            ApplicationBar.Opacity = 1.0;
            ApplicationBar.Mode = ApplicationBarMode.Minimized;

            var settingsItem = new ApplicationBarIconButton(new Uri("/Images/appbar.feature.settings.rest.png", UriKind.Relative));
            var helpItem = new ApplicationBarIconButton(new Uri("/Images/appbar.questionmark.rest.png", UriKind.Relative));
            var shareItem = new ApplicationBarIconButton(new Uri("/Images/share.png", UriKind.Relative));
            var rateItem = new ApplicationBarIconButton(new Uri("/Images/appbar.favs.rest.png", UriKind.Relative));

            settingsItem.Text = "settings";
            helpItem.Text = "help";
            shareItem.Text = "share";
            rateItem.Text = "rate";

            settingsItem.Click += SettingsClick;
            helpItem.Click += HelpClick;
            shareItem.Click += TwitterItemOnClick;
            rateItem.Click += RateItemOnClick;

            ApplicationBar.Buttons.Add(shareItem);
            ApplicationBar.Buttons.Add(settingsItem);
            ApplicationBar.Buttons.Add(helpItem);
            ApplicationBar.Buttons.Add(rateItem);

            Ad1.ApplicationId = "xxxxxx";
            Ad1.AdUnitId = "xxxxxx";
        }
开发者ID:AdamBenoit,项目名称:WindowsPhoneApps,代码行数:35,代码来源:MainPage.xaml.cs


示例4: BuildLocalizedApplicationBar

        private void BuildLocalizedApplicationBar()
        {
            ApplicationBar = new ApplicationBar();

            ApplicationBarIconButton undoButton = new ApplicationBarIconButton(new Uri("/Assets/back.png", UriKind.Relative)) { Text = AppResources.UndoAppBar };
            undoButton.Click += undoButton_Click;
            ApplicationBar.Buttons.Add(undoButton);

            ApplicationBarIconButton clearContentButton = new ApplicationBarIconButton(new Uri("/Assets/close.png", UriKind.Relative)) { Text = AppResources.ClearAppBar };
            clearContentButton.Click += clearContentButton_Click;
            ApplicationBar.Buttons.Add(clearContentButton);

            ApplicationBarIconButton openButton = new ApplicationBarIconButton(new Uri("/Assets/folder.png", UriKind.Relative)) { Text = AppResources.OpenAppBar };
            openButton.Click += openButton_Click;
            ApplicationBar.Buttons.Add(openButton);

            ApplicationBarIconButton saveButton = new ApplicationBarIconButton(new Uri("/Assets/save.png", UriKind.Relative)) { Text = AppResources.SaveAppBar };
            saveButton.Click += saveButton_Click;
            ApplicationBar.Buttons.Add(saveButton);

            ApplicationBarMenuItem rateMenuItem = new ApplicationBarMenuItem(AppResources.RateAppBar);
            rateMenuItem.Click += rateButton_Click;
            ApplicationBar.MenuItems.Add(rateMenuItem);

            ApplicationBarMenuItem infoMenuItem = new ApplicationBarMenuItem(AppResources.InfoAppBar);
            infoMenuItem.Click += infoMenuItem_Click;
            ApplicationBar.MenuItems.Add(infoMenuItem);
        }
开发者ID:kneefer,项目名称:DrawOnMe,代码行数:28,代码来源:MainPage.xaml.cs


示例5: BuildLocalizedApplicationBar

        private void BuildLocalizedApplicationBar()
        {
            ApplicationBar = new ApplicationBar();

            ApplicationBarIconButton sendButton = new ApplicationBarIconButton(new Uri("/Assets/AppBar/feature.email.png", UriKind.Relative));
            sendButton.Text = AppResources.SendButtonText;
            ApplicationBar.Buttons.Add(sendButton);
            sendButton.Click += Send;

            // TODO: Need paperclip icon
            ApplicationBarIconButton attachButton = new ApplicationBarIconButton(new Uri("/Assets/AppBar/attach.png", UriKind.Relative));
            attachButton.Text = AppResources.AttachButtonText;
            ApplicationBar.Buttons.Add(attachButton);
            attachButton.Click += Attach;

            ApplicationBarIconButton discardButton = new ApplicationBarIconButton(new Uri("/Assets/AppBar/cancel.png", UriKind.Relative));
            discardButton.Text = AppResources.DiscardButtonText;
            ApplicationBar.Buttons.Add(discardButton);
            discardButton.Click += Discard;

            ApplicationBarIconButton dictateButton = new ApplicationBarIconButton(new Uri("/Assets/AppBar/microphone.png", UriKind.Relative));
            dictateButton.Text = AppResources.DictateButtonText;
            ApplicationBar.Buttons.Add(dictateButton);
            dictateButton.Click += Dictate;

            ApplicationBarMenuItem labelMenuItem = new ApplicationBarMenuItem(AppResources.LabelItemText);
            ApplicationBar.MenuItems.Add(labelMenuItem);
            labelMenuItem.Click += LabelClick;
        }
开发者ID:achingono,项目名称:WinPhoneGmail,代码行数:29,代码来源:ComposePage.xaml.cs


示例6: BuildApplicationBar

		//----------------------------------------------------------------------
		#endregion
		//----------------------------------------------------------------------

		
		//----------------------------------------------------------------------
		#region --- Methods ---
		//----------------------------------------------------------------------
		/// <summary>
		/// Builds the application bar.
		/// </summary>
		private void BuildApplicationBar()
		{
			if (ApplicationBar == null)
			{
				ApplicationBar = new ApplicationBar();
			}

			var addButton = new ApplicationBarIconButton(new Uri("/Images/ApplicationBar/GroupManagement/add.png", UriKind.Relative));
			addButton.Text = AppResources.UI_GroupManagement_ApplicationBar_Add;
			addButton.Click += Add;

			_deleteButton = new ApplicationBarIconButton(new Uri("/Images/ApplicationBar/GroupManagement/delete.png", UriKind.Relative));
			_deleteButton.Text = AppResources.UI_GroupManagement_ApplicationBar_Delete;
			_deleteButton.Click += Delete;

			_deleteAllMenuItem = new ApplicationBarMenuItem();
			_deleteAllMenuItem.Text = AppResources.UI_GroupManagement_ApplicationBar_DeleteAll;
			_deleteAllMenuItem.Click += DeleteAll;

			ApplicationBar.Buttons.Add(addButton);
			ApplicationBar.Buttons.Add(_deleteButton);
			ApplicationBar.MenuItems.Add(_deleteAllMenuItem);

			UpdateApplicationBarItems();
		}
开发者ID:DarkQuantum,项目名称:WoW-Armory-for-Windows-Phone-8,代码行数:36,代码来源:GroupManagementPage.xaml.cs


示例7: SetupAppBar_TypeFrequency

        private void SetupAppBar_TypeFrequency()
        {
            ApplicationBar = new ApplicationBar();
            ApplicationBar.IsVisible = true;

            ApplicationBarIconButton save = new ApplicationBarIconButton();
            save.IconUri = new Uri("/Assets/icons/Dark/save.png", UriKind.Relative);
            save.Text = AppResources.AppBarButtonSave;
            ApplicationBar.Buttons.Add(save);
            save.Click += new EventHandler(Save_Click);

            ApplicationBarIconButton saveContinute = new ApplicationBarIconButton();
            saveContinute.IconUri = new Uri("/Assets/icons/Dark/refresh.png", UriKind.Relative);
            saveContinute.Text = AppResources.AppBarButtonContinue;
            ApplicationBar.Buttons.Add(saveContinute);
            save.Click += new EventHandler(Continue_Click);

            ApplicationBarIconButton delete = new ApplicationBarIconButton();
            delete.IconUri = new Uri("/Assets/icons/Dark/delete.png", UriKind.Relative);
            delete.Text = AppResources.AppBarButtonDelete;
            ApplicationBar.Buttons.Add(delete);
            save.Click += new EventHandler(Delete_Click);

            ApplicationBarIconButton add = new ApplicationBarIconButton();
            add.IconUri = new Uri("/Assets/icons/Dark/add.png", UriKind.Relative);
            add.Text = AppResources.AppBarButtonAdd;
            ApplicationBar.Buttons.Add(add);
            add.Click += new EventHandler(Add_Click);

            ApplicationBarMenuItem mainMenu = new ApplicationBarMenuItem();
            mainMenu.Text = AppResources.AppBarButtonMainMenu;
            ApplicationBar.MenuItems.Add(mainMenu);
            mainMenu.Click += new EventHandler(MainMenu_Click);

        }
开发者ID:stavrianosy,项目名称:BudgetManagementAssistant,代码行数:35,代码来源:TypeFrequency.xaml.cs


示例8: BuildLocalizedApplicationBar

 private void BuildLocalizedApplicationBar()
 {
     ApplicationBar = new ApplicationBar();
     ApplicationBarMenuItem appBarMenuItem = new ApplicationBarMenuItem("Visitor");
     appBarMenuItem.Click += appBarMenuItem_Click;
     ApplicationBar.MenuItems.Add(appBarMenuItem);
 }
开发者ID:EpigrafTeknoloji,项目名称:8digits-WindowsPhone-SDK-Sample-App,代码行数:7,代码来源:MainPage.xaml.cs


示例9: FeedbackPage

        public FeedbackPage()
        {
            ApplicationBar = new ApplicationBar();
            ApplicationBar.Mode = ApplicationBarMode.Default;
            ApplicationBar.StateChanged += (sender, e) =>
            {
                var bar = (sender as ApplicationBar);
                if (CurrentViewState.Equals(FeedbackViewState.ImageShow) || CurrentViewState.Equals(FeedbackViewState.ImageEdit)) {
                    if (e.IsMenuVisible)
                    {
                        bar.Opacity = 0.75;
                    }
                    else
                    {
                        bar.Opacity = 0;
                    }
                } 
            };

            Action<FeedbackViewState> switchViewStateAction = (newViewState) =>
            {
                SwitchToViewState(newViewState);
            };
            this.VM = new FeedbackPageVM(switchViewStateAction);

            this.formControl = new FeedbackMessageFormControl(this);
            this.listControl = new FeedbackMessageListControl(this);
            this.imageControl = new FeedbackImageControl(this);

            initializeAppBarIcons();
            
            InitializeComponent();
        }
开发者ID:bitstadium,项目名称:HockeySDK-Windows,代码行数:33,代码来源:FeedbackPage.xaml.cs


示例10: MainPage

        //public bool _firstTime = true;
        public MainPage()
        {
            InitializeComponent();

            #region Application Bar
            ApplicationBar = new ApplicationBar { IsMenuEnabled = true, IsVisible = true, Opacity = .9 };

            var tweet = new ApplicationBarIconButton(new Uri("/Images/tweet.png", UriKind.Relative));
            tweet.Text = "tweet";
            tweet.Click += new EventHandler(btnTweetButton_Click);

            var refresh = new ApplicationBarIconButton(new Uri("/Images/refresh.png", UriKind.Relative));
            refresh.Text = "refresh";
            refresh.Click += new EventHandler(btnRefreshButton_Click);

            //var accountSetting = new ApplicationBarMenuItem();
            //accountSetting.Text = "Change account";
            //accountSetting.Click += new EventHandler(btnAccSetting_Click);

            var support = new ApplicationBarMenuItem();
            support.Text = "About";
            support.Click += new EventHandler(support_Click);

            ApplicationBar.Buttons.Add(tweet);
            ApplicationBar.Buttons.Add(refresh);
            //ApplicationBar.MenuItems.Add(accountSetting);
            ApplicationBar.MenuItems.Add(support);

            #endregion

            // Set the data context of the listbox control to the sample data
            DataContext = App.ViewModel;
            Loaded += MainPage_Loaded;
        }
开发者ID:pwattjaidee,项目名称:Thaibird,代码行数:35,代码来源:MainPage.xaml.cs


示例11: MainPage

        // Constructor
        public MainPage()
        {
              InitializeComponent();


            // Set the data context of the listbox control to the sample data
            DataContext = App.ViewModel;

            //// Add a new background Image
            BitmapImage bitmapImage = new BitmapImage(new Uri("PanoramaBackground.png", UriKind.Relative));
            ImageBrush imageBrush = new ImageBrush();
            imageBrush.ImageSource = bitmapImage;
            PanoControl.Background = imageBrush;
      
            ApplicationBar = new ApplicationBar();
          
           
            //adding an iconbutton
            ApplicationBarIconButton About = new ApplicationBarIconButton();
            About.Text = AppResources.About;
            About.Click += About_Click;
            About.IconUri = new Uri("/Assets/Icons/appbar.information.circle.png", UriKind.Relative);

            //adding another icon button
            ApplicationBarIconButton Exit = new ApplicationBarIconButton();
            Exit.Text = AppResources.Exit;
            Exit.Click += Exit_Click;
            Exit.IconUri = new Uri("/Assets/Icons/appbar.stop.png", UriKind.Relative);

            //ApplicationBar.Buttons.Add(Home);
            ApplicationBar.Buttons.Add(About);
            ApplicationBar.Buttons.Add(Exit);


        }
开发者ID:milincjoshi,项目名称:GameofThrones,代码行数:36,代码来源:MainPage.xaml.cs


示例12: BuildApplicationBar

		/// <summary>
		/// Builds the application bar.
		/// </summary>
		private void BuildApplicationBar()
		{
			if (ApplicationBar == null)
			{
				ApplicationBar = new ApplicationBar();
			}

			var searchButton = new ApplicationBarIconButton(new Uri("/Images/ApplicationBar/GuildList/search.png", UriKind.Relative));
			searchButton.Text = AppResources.UI_GuildList_ApplicationBar_Search;
			searchButton.Click += ShowGuildSearchView;

			_deleteAllButton = new ApplicationBarIconButton(new Uri("/Images/ApplicationBar/CharacterList/delete.png", UriKind.Relative));
			_deleteAllButton.Text = AppResources.UI_CharacterList_ApplicationBar_DeleteAll;
			_deleteAllButton.Click += DeleteAll;

			_sortByNameMenuItem = new ApplicationBarMenuItem(AppResources.UI_GuildList_ApplicationBar_SortByName);
			_sortByNameMenuItem.Click += SortByName;

			_sortByLevelMenuItem = new ApplicationBarMenuItem(AppResources.UI_GuildList_ApplicationBar_SortByLevel);
			_sortByLevelMenuItem.Click += SortByLevel;

			_sortByMembersMenuItem = new ApplicationBarMenuItem(AppResources.UI_GuildList_ApplicationBar_SortByMembers);
			_sortByMembersMenuItem.Click += SortByMembers;

			ApplicationBar.Buttons.Add(searchButton);
			ApplicationBar.Buttons.Add(_deleteAllButton);
			ApplicationBar.MenuItems.Add(_sortByNameMenuItem);
			ApplicationBar.MenuItems.Add(_sortByLevelMenuItem);
			ApplicationBar.MenuItems.Add(_sortByMembersMenuItem);

			UpdateApplicationBarItems();
		}
开发者ID:DarkQuantum,项目名称:WoW-Armory-for-Windows-Phone-8,代码行数:35,代码来源:GuildListPage.xaml.cs


示例13: Settings

        public Settings()
        {
            InitializeComponent();
            // Add an Application Bar that has a 'done' confirmation button and
            // a 'cancel' button

            ApplicationBar = new ApplicationBar();
            ApplicationBar.IsMenuEnabled = true;
            ApplicationBar.IsVisible = true;
            ApplicationBar.Opacity = 1.0;

            ApplicationBarIconButton doneButton = new ApplicationBarIconButton(new Uri("/Images/appbar.check.rest.png", UriKind.Relative));
            doneButton.Text = "done";
            doneButton.Click += new EventHandler(doneButton_Click);

            ApplicationBarIconButton cancelButton = new ApplicationBarIconButton(new Uri("/Images/appbar.Close.rest.png", UriKind.Relative));
            cancelButton.Text = "cancel";
            cancelButton.Click += new EventHandler(cancelButton_Click);

            ApplicationBar.Buttons.Add(doneButton);
            ApplicationBar.Buttons.Add(cancelButton);

            toEmailTextBlock.Text = settings.ToEmailSetting;
            toNameTextBlock.Text = settings.ToNameSetting;
            dayStartTextBox.Text = settings.DayStartSetting;
            lunchStartTextBox.Text = settings.LunchStartSetting;
            lunchEndTextBox.Text = settings.LunchEndSetting;
            dayEndTextBox.Text = settings.DayEndSetting;
        }
开发者ID:AdamBenoit,项目名称:WindowsPhoneApps,代码行数:29,代码来源:Settings.xaml.cs


示例14: BlogSettingsPage

        public BlogSettingsPage()
        {
            InitializeComponent();

            DataContext = App.MasterViewModel;

            _localizedStrings = App.Current.Resources["StringTable"] as StringTable;

            _thumbnailSizes = new List<string>();
            _thumbnailSizes.Add(_localizedStrings.ControlsText.OriginalSize);
            int limit = 10;
            for (int i = 1; i < limit; i++)
            {
                _thumbnailSizes.Add((i * 100).ToString());
            }

            ApplicationBar = new ApplicationBar();
            ApplicationBar.BackgroundColor = (Color)App.Current.Resources["AppbarBackgroundColor"];
            ApplicationBar.ForegroundColor = (Color)App.Current.Resources["WordPressGrey"];

            _saveIconButton = new ApplicationBarIconButton(new Uri("/Images/appbar.save.png", UriKind.Relative));
            _saveIconButton.Text = _localizedStrings.ControlsText.Save;
            _saveIconButton.Click += OnSaveButtonClick;
            ApplicationBar.Buttons.Add(_saveIconButton);

            Loaded += OnPageLoaded;
        }
开发者ID:timextreasures,项目名称:WordPress-WindowsPhone,代码行数:27,代码来源:BlogSettingsPage.xaml.cs


示例15: BuildAppBar

        private void BuildAppBar()
        {
            _shareAppBar = new ApplicationBar();
            ShareButton = new ApplicationBarIconButton(new Uri("/Assets/images/check.png", UriKind.Relative))
                {
                    Text = "share",
                    IsEnabled = false
                };

            ShareButton.Click += (sender, args) =>
                {
                    viewModel.ShareTask();
                    Focus();
                };

            _shareAppBar.Buttons.Add(ShareButton);

            var about = new ApplicationBarMenuItem(AppResources.about);
            about.Click +=
                (sender, args) => NavigationService.Navigate(new Uri("/Views/AboutView.xaml", UriKind.Relative));

            var logout = new ApplicationBarMenuItem("logout");
            logout.Click += (sender, args) => Logout();

            _shareAppBar.MenuItems.Add(logout);
            _shareAppBar.MenuItems.Add(about);

            _photosAppBar = new ApplicationBar();
            _photosAppBar.MenuItems.Add(logout);
            _photosAppBar.MenuItems.Add(about);
        }
开发者ID:ufacode,项目名称:imagenary.wp,代码行数:31,代码来源:MainView.xaml.cs


示例16: BuildLocalizedApplicationBar

        // 用于生成本地化 ApplicationBar 的示例代码
        private void BuildLocalizedApplicationBar()
        {
            // 将页面的 ApplicationBar 设置为 ApplicationBar 的新实例。
            ApplicationBar = new ApplicationBar();

            // 创建新按钮并将文本值设置为 AppResources 中的本地化字符串。
            ApplicationBarIconButton appBarButtonDepartment =
                new ApplicationBarIconButton(new Uri("/Assets/Icons/folder.png", UriKind.Relative));
            appBarButtonDepartment.Text = AppResources.AppBarButtonDepartment;
            ApplicationBar.Buttons.Add(appBarButtonDepartment);

            ApplicationBarIconButton appBarButtonSearch =
                new ApplicationBarIconButton(new Uri("/Assets/Icons/feature.search.png", UriKind.Relative));
            appBarButtonSearch.Text = AppResources.AppBarButtonSearch;
            ApplicationBar.Buttons.Add(appBarButtonSearch);

            ApplicationBarIconButton appBarButtonExit =
                new ApplicationBarIconButton(new Uri("/Assets/Icons/close.png", UriKind.Relative));
            appBarButtonExit.Text = AppResources.AppBarButtonExit;
            ApplicationBar.Buttons.Add(appBarButtonExit);

            // 使用 AppResources 中的本地化字符串创建新菜单项。
            //ApplicationBarMenuItem appBarMenuItem = new ApplicationBarMenuItem(AppResources.AppBarMenuItemText);
            //ApplicationBar.MenuItems.Add(appBarMenuItem);
        }
开发者ID:kidfruit,项目名称:WisdriContacts,代码行数:26,代码来源:DepartmentPage.xaml.cs


示例17: BuildLocalizedApplicationBar

        // Sample code for building a localized ApplicationBar
        private void BuildLocalizedApplicationBar()
        {
            // Set the page's ApplicationBar to a new instance of ApplicationBar.
            ApplicationBar = new ApplicationBar();

            // Create a new button and set the text value to the localized string from AppResources.
            ApplicationBarIconButton appBarButtonHear = new ApplicationBarIconButton(new Uri("/Images/QuestionMark.png", UriKind.Relative));
            appBarButtonHear.Text = "Hear";
            appBarButtonHear.Click += appBarButton_Click;
            ApplicationBar.Buttons.Add(appBarButtonHear);

            ApplicationBarIconButton appBarButtonShare = new ApplicationBarIconButton(new Uri("/Images/share.png", UriKind.Relative));
            appBarButtonShare.Text = "Share";
            appBarButtonShare.Click += appBarButtonShare_Click;
            ApplicationBar.Buttons.Add(appBarButtonShare);

            ApplicationBarIconButton appBarButtonReview = new ApplicationBarIconButton(new Uri("/Images/favs.png", UriKind.Relative));
            appBarButtonReview.Text = "Review";
            appBarButtonReview.Click += appBarButtonReview_Click;
            ApplicationBar.Buttons.Add(appBarButtonReview);

            ApplicationBarIconButton appBarButtonSpeech = new ApplicationBarIconButton(new Uri("/Images/microphone.png", UriKind.Relative));
            appBarButtonSpeech.Text = "Speech";
            appBarButtonSpeech.Click += appBarButtonSpeech_Click;
            ApplicationBar.Buttons.Add(appBarButtonSpeech);

            // Create a new menu item with the localized string from AppResources.
            ApplicationBarMenuItem appBarMenuItem = new ApplicationBarMenuItem(AppResources.AppBarMenuItemText);
            appBarMenuItem.Text = "About";
            appBarMenuItem.Click += appBarMenuItem_Click; 
            ApplicationBar.MenuItems.Add(appBarMenuItem);
        }
开发者ID:BrianLima,项目名称:Helix,代码行数:33,代码来源:MainPage.xaml.cs


示例18: CreateDefaultApplicationBar

        public ApplicationBar CreateDefaultApplicationBar()
        {
            ApplicationBar retAppBar = new ApplicationBar();
              retAppBar.IsVisible = true;
              retAppBar.IsMenuEnabled = true;
              retAppBar.Opacity = 1;
              retAppBar.ForegroundColor = Prez.ApplicationForegroundColor;
              retAppBar.BackgroundColor = Prez.ApplicationBackgroundColor;

              //add menu items in order that you want them to appear

              //Feed Items Pages (MainPage)
              ApplicationBarIconButton btnFeedItemsPage = new ApplicationBarIconButton(Prez.FeedItemsPageApplicationBarIconUri);
              btnFeedItemsPage.Text = Prez.FeedItemsPageApplicationBarText;
              btnFeedItemsPage.Click += new EventHandler(btnFeedItemsPage_Click);
              retAppBar.Buttons.Add(btnFeedItemsPage);

              //view browser page
              ApplicationBarIconButton btnBrowserPage = new ApplicationBarIconButton(Prez.BrowserPageApplicationBarIconUri);
              btnBrowserPage.Text = Prez.BrowserPageApplicationBarText;
              btnBrowserPage.Click += new EventHandler(btnBrowserPage_Click);
              retAppBar.Buttons.Add(btnBrowserPage);

              //view Feed Sources Page
              ApplicationBarIconButton btnFeedSourcesPage = new ApplicationBarIconButton(Prez.FeedSourcesPageApplicationBarIconUri);
              btnFeedSourcesPage.Text = Prez.FeedSourcesPageApplicationBarText;
              btnFeedSourcesPage.Click += new EventHandler(btnFeedSourcesPage_Click);
              retAppBar.Buttons.Add(btnFeedSourcesPage);

              return retAppBar;
        }
开发者ID:bill-mybiz,项目名称:old_DoinIt-WP7-Feed-Reader,代码行数:31,代码来源:SimpleDefaultApplicationBarCreator.cs


示例19: InitializeApplicationBar

        public void InitializeApplicationBar()
        {
            ApplicationBarForBudgetProject = new ApplicationBar();
            ApplicationBarForBudgetMonthlyReport = new ApplicationBar();

            // Add budgetProject button.

            ApplicationBarIconButton addBudgetProjectButton =
                new ApplicationBarIconButton(IconUirs.AddPlusIconButton);
            addBudgetProjectButton.Text = AppResources.AddButtonText;
            addBudgetProjectButton.Click += new System.EventHandler(addBudgetProjectButton_Click);

            ApplicationBarIconButton exportBudgetProjectsButton =
                new ApplicationBarIconButton(IconUirs.ColoudIconButton);
            exportBudgetProjectsButton.Text = AppResources.ExportReport;

            ApplicationBarForBudgetProject.Buttons.Add(addBudgetProjectButton);
            //ApplicationBarForBudgetProject.Buttons.Add(exportBudgetProjectsButton);

            ApplicationBarIconButton exportBudgetMonthlyReportButton =
              new ApplicationBarIconButton(IconUirs.ColoudIconButton);
            exportBudgetMonthlyReportButton.Text = AppResources.ExportReport;
            exportBudgetMonthlyReportButton.IsEnabled = false;

            ApplicationBarForBudgetMonthlyReport.Buttons.Add(exportBudgetMonthlyReportButton);

            applicationBarForProjectlistSelectorMode = new ApplicationBar();
            ApplicationBarIconButton deleteMenuItem = new ApplicationBarIconButton(IconUirs.DeleteIcon);
            deleteMenuItem.Text = AppResources.Delete;
            deleteMenuItem.Click += new System.EventHandler(deleteMenuItem_Click);

            applicationBarForProjectlistSelectorMode.Buttons.Add(deleteMenuItem);
        }
开发者ID:RukaiYu,项目名称:TinyMoneyManager.WP8,代码行数:33,代码来源:BudgetProjectListPage.xaml.cs


示例20: BuildLocalizedApplicationBar

        //Sample code for building a localized ApplicationBar
        private void BuildLocalizedApplicationBar()
        {
            // Set the page's ApplicationBar to a new instance of ApplicationBar.
            ApplicationBar = new ApplicationBar();

            // Create a new menu item with the localized string from AppResources.
            ApplicationBarMenuItem appBarMenuItem;

            // Blue
            appBarMenuItem = new ApplicationBarMenuItem(AppResources.AppBarColorBlueText);
            appBarMenuItem.Click += appBarMenuItem_Click;
            ApplicationBar.MenuItems.Add(appBarMenuItem);

            // White
            appBarMenuItem = new ApplicationBarMenuItem(AppResources.AppBarColorWhiteText);
            appBarMenuItem.Click += appBarMenuItem_Click;
            ApplicationBar.MenuItems.Add(appBarMenuItem);

            // Red
            appBarMenuItem = new ApplicationBarMenuItem(AppResources.AppBarColorRedText);
            appBarMenuItem.Click += appBarMenuItem_Click;
            ApplicationBar.MenuItems.Add(appBarMenuItem);

            // Orange
            appBarMenuItem = new ApplicationBarMenuItem(AppResources.AppBarColorOrangeText);
            appBarMenuItem.Click += appBarMenuItem_Click;
            ApplicationBar.MenuItems.Add(appBarMenuItem);
        }
开发者ID:JamieChung,项目名称:Windows-8-Independent-Study,代码行数:29,代码来源:MainPage.xaml.cs



注:本文中的Microsoft.Phone.Shell.ApplicationBar类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Shell.ApplicationBarIconButton类代码示例发布时间:2022-05-26
下一篇:
C# Controls.Map类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap