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

C# Shell.ApplicationBarMenuItem类代码示例

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

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



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

示例1: 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 appBarButton = new ApplicationBarIconButton(new Uri("/Assets/AppBar/appbar.add.rest.png", UriKind.Relative));
            //appBarButton.Text = AppResources.AppBarButtonText;
            //ApplicationBar.Buttons.Add(appBarButton);

            // Create a new menu item with the localized string from AppResources.
            ApplicationBarMenuItem appBarGreyMenuItem = new ApplicationBarMenuItem("Grey");
            appBarGreyMenuItem.Click += appBarGreyMenuItem_Click;
            ApplicationBar.MenuItems.Add(appBarGreyMenuItem);

            ApplicationBarMenuItem appBarBlackWhiteMenuItem = new ApplicationBarMenuItem("Black/White");
            appBarBlackWhiteMenuItem.Click += appBarBlackWhiteMenuItem_Click;
            ApplicationBar.MenuItems.Add(appBarBlackWhiteMenuItem);

            ApplicationBarMenuItem appBarRedMenuItem = new ApplicationBarMenuItem("Red");
            appBarRedMenuItem.Click += appBarRedMenuItem_Click;
            ApplicationBar.MenuItems.Add(appBarRedMenuItem);

            ApplicationBarMenuItem appBarInverseMenuItem = new ApplicationBarMenuItem("Inverse");
            appBarInverseMenuItem.Click += appBarInverseMenuItem_Click;
            ApplicationBar.MenuItems.Add(appBarInverseMenuItem);

            ApplicationBarMenuItem appBarBlueYellowMenuItem = new ApplicationBarMenuItem("Blue/Yellow");
            appBarBlueYellowMenuItem.Click += appBarBlueYellowMenuItem_Click;
            ApplicationBar.MenuItems.Add(appBarBlueYellowMenuItem);

            ApplicationBar.Mode = ApplicationBarMode.Minimized;
        }
开发者ID:physicspackage,项目名称:WindowsStoreFastVideoProcessing,代码行数:34,代码来源:MainPage.xaml.cs


示例2: 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


示例3: 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


示例4: 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


示例5: 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


示例6: 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


示例7: 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


示例8: AddMenuItem

        public void AddMenuItem(ApplicationBarMenuItem menuItem)
        {
            this.MenuItems.Add(menuItem);

            if (this.OnMenuItemAdded != null)
                this.OnMenuItemAdded(this);
        }
开发者ID:AleksandarDev,项目名称:Eve,代码行数:7,代码来源:ApplicationBarPage.cs


示例9: BuildLocalizedApplicationBar

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

            ApplicationBarMenuItem appBarMenuItem = new ApplicationBarMenuItem("settings");
            appBarMenuItem.Click += AppBarMenuItem_Click;
            ApplicationBar.MenuItems.Add(appBarMenuItem);

            ApplicationBarMenuItem appBarMenuItemTutorial = new ApplicationBarMenuItem("tutorial");
            appBarMenuItemTutorial.Click += appBarMenuItemTutorial_Click;
            ApplicationBar.MenuItems.Add(appBarMenuItemTutorial);
            
            ApplicationBarMenuItem appBarMenuItemAbout = new ApplicationBarMenuItem("About");
            appBarMenuItemAbout.Click += appBarMenuItemAbout_Click;
            ApplicationBar.MenuItems.Add(appBarMenuItemAbout);

            ApplicationBarMenuItem appBarMenuItemReview = new ApplicationBarMenuItem("review and rate me!");
            appBarMenuItemReview.Click += appBarMenuItemReview_Click;
            ApplicationBar.MenuItems.Add(appBarMenuItemReview);

#if DEBUG
            ApplicationBarIconButton testNoting = new ApplicationBarIconButton(new Uri("/Assets/Tiles/add.png", UriKind.Relative));
            testNoting.Text = "Test Noting";
            testNoting.Click += testNoting_Click;
            ApplicationBar.Buttons.Add(testNoting);

            ApplicationBarIconButton testQuestion = new ApplicationBarIconButton(new Uri("/Assets/Tiles/add.png", UriKind.Relative));
            testQuestion.Text = "Test Question";
            testQuestion.Click += testQuestion_Click;
            ApplicationBar.Buttons.Add(testQuestion);
#endif
        }
开发者ID:BrianLima,项目名称:CortanaQuick,代码行数:32,代码来源:MainPage.xaml.cs


示例10: InitializeApplicationBar

        private void InitializeApplicationBar()
        {
            /**
             * Because the app bar isn't a Silverlight control (wtf) we can't use binding in it,
             * so if we want localisation we have to create all these in code. Sigh.
             **/
            ApplicationBarIconButton twitterButton = new ApplicationBarIconButton();
            twitterButton.Text = AppResources.AboutPageAppBarTwitterText;
            twitterButton.IconUri = new Uri("/Icons/appbar.twitter.bird.png", UriKind.Relative);
            twitterButton.Click += TwitterButton_Click;
            ApplicationBar.Buttons.Add(twitterButton);

            ApplicationBarIconButton emailButton = new ApplicationBarIconButton();
            emailButton.Text = AppResources.AboutPageAppBarEmailText;
            emailButton.IconUri = new Uri("/Icons/appbar.feature.email.rest.png", UriKind.Relative);
            emailButton.Click += EmailButton_Click;
            ApplicationBar.Buttons.Add(emailButton);

            ApplicationBarIconButton otherAppsButton = new ApplicationBarIconButton();
            otherAppsButton.Text = AppResources.AboutPageAppBarOtherAppsText;
            otherAppsButton.IconUri = new Uri("/Icons/appbar.marketplace.png", UriKind.Relative);
            otherAppsButton.Click += OtherApps_Click;
            ApplicationBar.Buttons.Add(otherAppsButton);

            ApplicationBarIconButton reviewAppButton = new ApplicationBarIconButton();
            reviewAppButton.Text = AppResources.AboutPageAppBarReviewAppText;
            reviewAppButton.IconUri = new Uri("/Icons/appbar.favs.rest.png", UriKind.Relative);
            reviewAppButton.Click += ReviewApp_Click;
            ApplicationBar.Buttons.Add(reviewAppButton);

            ApplicationBarMenuItem websiteMenuItem = new ApplicationBarMenuItem();
            websiteMenuItem.Text = AppResources.AboutPageAppBarWebsiteText;
            websiteMenuItem.Click += WebsiteMenuItem_Click;
            ApplicationBar.MenuItems.Add(websiteMenuItem);
        }
开发者ID:adamsp,项目名称:wsnz-windowsphone,代码行数:35,代码来源:AboutPage.xaml.cs


示例11: CreateButtons

        private void CreateButtons()
        {
            _saveButton = new ApplicationBarIconButton
            {
                Text = "save",
                IconUri = new Uri("Assets/Icons/Save.png", UriKind.Relative),
            };


            _feedbackItem = new ApplicationBarMenuItem
            {
                Text = "feedback"
            };

            _aboutMenuItem = new ApplicationBarMenuItem
            {
                Text = "about"
            };

            _saveButton.Click += SaveButton_Click;
            _feedbackItem.Click += feedbackItem_Click;
            _aboutMenuItem.Click += AboutMenuItem_Click;

            ApplicationBar.Buttons.Add(_saveButton);
            ApplicationBar.MenuItems.Add(_feedbackItem);
            ApplicationBar.MenuItems.Add(_aboutMenuItem);


        }
开发者ID:neufrin,项目名称:PhotoMixer,代码行数:29,代码来源:MixedPage.xaml.cs


示例12: ListViewPage

 public ListViewPage()
 {
     InitializeComponent();
     // Application bar is initialized
     ApplicationBar = new ApplicationBar();
     sortmenuitem = new ApplicationBarMenuItem("Sort notes");
     // ApplicationBar mode is set to default
     ApplicationBar.Mode = ApplicationBarMode.Default;
     // ApplicationBar opacity is set 1
     ApplicationBar.Opacity = 1.0;
     // ApplicationBar visibility is set to true
     ApplicationBar.IsVisible = true;
     ApplicationBar.IsMenuEnabled = true;
     // ApplicationBar button is initilized
     ApplicationBarIconButton addbtn = new ApplicationBarIconButton();
     ApplicationBarIconButton changepass = new ApplicationBarIconButton();
     // Application button icon is set
     addbtn.IconUri = new Uri("/Assets/AppbarIcons/add.png", UriKind.Relative);
     changepass.IconUri = new Uri("/Assets/AppbarIcons/key.png", UriKind.Relative);
     // Text to ApplicationBar is set
     addbtn.Text = "add notes";
     changepass.Text = "Change password";
     // ApplicationBar click event is registered
     addbtn.Click += addbtn_Click;
     changepass.Click += Changepass_Click;
     sortmenuitem.Click += Sortmenuitem_Click;
     // Button is added to ApplicationBar
     ApplicationBar.Buttons.Add(addbtn);
     ApplicationBar.Buttons.Add(changepass);
     ApplicationBar.MenuItems.Add(sortmenuitem);
     
 }
开发者ID:krishnadevalla,项目名称:EncryptNotes,代码行数:32,代码来源:ListViewPage.xaml.cs


示例13: MainPage

        /// <summary>
        /// Constructor.
        /// </summary>
        public MainPage()
        {
            InitializeComponent();

            VideoCanvas.Tap += new EventHandler<GestureEventArgs>(videoCanvas_Tap);

            DataContext = _dataContext;

            _progressIndicator.IsIndeterminate = true;

            CreateAppBar();
            ApplicationBarMenuItem menuItem = new ApplicationBarMenuItem();
            menuItem.Text = "about";
            menuItem.IsEnabled = false;
            ApplicationBar.MenuItems.Add(menuItem);
            menuItem.Click += new EventHandler(aboutMenuItem_Click);

            ApplicationBarMenuItem uploadMenuItem = new ApplicationBarMenuItem();
            uploadMenuItem.Text = "upload settings";
            uploadMenuItem.IsEnabled = false;
            ApplicationBar.MenuItems.Add(uploadMenuItem);
            uploadMenuItem.Click += new EventHandler(uploadSettingsButton_Click);

            ApplicationBarMenuItem userMenuItem = new ApplicationBarMenuItem();
            userMenuItem.Text = "user settings";
            userMenuItem.IsEnabled = false;
            ApplicationBar.MenuItems.Add(userMenuItem);
            userMenuItem.Click += new EventHandler(userSettingsButton_Click);

            // Disable app sleep
            PhoneApplicationService phoneAppService = PhoneApplicationService.Current;
            phoneAppService.UserIdleDetectionMode = IdleDetectionMode.Disabled;
        }
开发者ID:tanhuiyan,项目名称:vlc-localization,代码行数:36,代码来源:MainPage.xaml.cs


示例14: LibraryPage

        public LibraryPage()
        {
            InitializeComponent();

            ApplicationBar = ThemeManager.CreateApplicationBar();
            ApplicationBar.Mode = ApplicationBarMode.Default;
            ApplicationBar.Opacity = .8;
            ApplicationBar.IsVisible = true;
            ApplicationBar.IsMenuEnabled = true;

            ApplicationBarIconButton backIcon = new ApplicationBarIconButton();
            backIcon.IconUri = new Uri("/Images/back.png", UriKind.Relative);
            backIcon.Text = "previous";
            ApplicationBar.Buttons.Add(backIcon);
            backIcon.Click += new EventHandler(backBrowser_Click);

            ApplicationBarIconButton refreshIcon = new ApplicationBarIconButton();
            refreshIcon.IconUri = new Uri("/Images/refresh.png", UriKind.Relative);
            refreshIcon.Text = "refresh";
            ApplicationBar.Buttons.Add(refreshIcon);
            refreshIcon.Click += new EventHandler(refreshBrowser_Click);

            ApplicationBarIconButton forwardIcon = new ApplicationBarIconButton();
            forwardIcon.IconUri = new Uri("/Images/next.png", UriKind.Relative);
            forwardIcon.Text = "forward";
            ApplicationBar.Buttons.Add(forwardIcon);
            forwardIcon.Click += new EventHandler(forwardBrowser_Click);

            ApplicationBarMenuItem openInBrowser = new ApplicationBarMenuItem();
            openInBrowser.Text = "open in browser";
            ApplicationBar.MenuItems.Add(openInBrowser);
            openInBrowser.Click += new EventHandler(openInBrowser_Click);
        }
开发者ID:jessicahuynh,项目名称:brandeis-wp8,代码行数:33,代码来源:LibraryPage.xaml.cs


示例15: OnNavigatedTo

        protected override void OnNavigatedTo(
            bool cancelled, NavigationEventArgs e)
        {
            if (cancelled || _entry != null)
                return;

            var database = Cache.Database;
            if (database == null)
            {
                GoBack<MainPage>();
                return;
            }

            var id = NavigationContext
                .QueryString["entry"];

            _entry = database.GetEntry(id) ??
                CurrentEntry.Entry;

            foreach (var field in _entry.CustomFields.Take(3))
            {
                var item = new ApplicationBarMenuItem(field.Key);
                item.Click += (s, _) => SetValue(field.Value);
                ApplicationBar.MenuItems.Add(item);
            }
        }
开发者ID:nthobois,项目名称:7Pass,代码行数:26,代码来源:WebView.xaml.cs


示例16: LoadAppBar

        private void LoadAppBar()
        {
            ApplicationBar = new ApplicationBar();
            ApplicationBarMenuItem menuToday = new ApplicationBarMenuItem();
            menuToday.Text = AppResources.AppBar_Today;
            menuToday.Click += menuToday_Click;
            ApplicationBar.MenuItems.Add(menuToday);

            ApplicationBarMenuItem menuWeek = new ApplicationBarMenuItem();
            menuWeek.Text = AppResources.AppBar_LastWeek;
            menuWeek.Click += menuWeek_Click;
            ApplicationBar.MenuItems.Add(menuWeek);

            ApplicationBarMenuItem menuMonth = new ApplicationBarMenuItem();
            menuMonth.Text = AppResources.AppBar_LastMonth;
            menuMonth.Click += menuMonth_Click;
            ApplicationBar.MenuItems.Add(menuMonth);

            ApplicationBarIconButton btnShare = new ApplicationBarIconButton();
            btnShare.IconUri = new Uri("/Assets/AppBar/Share.png", UriKind.Relative);
            btnShare.Text = AppResources.AppBar_Share;
            btnShare.Click += btnShare_Click;
            ApplicationBar.Buttons.Add(btnShare);

            ApplicationBarIconButton btnGetDirections = new ApplicationBarIconButton();
            btnGetDirections.IconUri = new Uri("/Assets/AppBar/Directions.png", UriKind.Relative);
            btnGetDirections.Text = AppResources.AppBar_Directions;
            btnGetDirections.Click += btnGetDirections_Click;
            ApplicationBar.Buttons.Add(btnGetDirections);
        }
开发者ID:JorgeCupi,项目名称:SmartGuard,代码行数:30,代码来源:FriendInfoView.xaml.cs


示例17: 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


示例18: MainPage

        // 构造函数
        public MainPage()
        {
            InitializeComponent();
            ApplicationBar = new ApplicationBar();
            categoryBtn = new ApplicationBarIconButton(new Uri("/Assets/AppBar/folder.png", UriKind.Relative));
            categoryBtn.Text = "板块";
            categoryBtn.Click += new EventHandler(Categroy_Click);
            newpostBtn = new ApplicationBarIconButton(new Uri("/Assets/AppBar/add.png", UriKind.Relative));
            newpostBtn.Text = "发串";
            newpostBtn.IsEnabled = false;
            jumptoBtn = new ApplicationBarIconButton(new Uri("/Assets/AppBar/next.png", UriKind.Relative));
            jumptoBtn.Text = "跳转";
            jumptoBtn.IsEnabled = false;
            refreshBtn = new ApplicationBarIconButton(new Uri("/Assets/AppBar/refresh.png", UriKind.Relative));
            refreshBtn.Text = "刷新";
            refreshBtn.Click += new EventHandler(RefreshItem_Click);

            saveimageBtn = new ApplicationBarIconButton(new Uri("/Assets/AppBar/save.png", UriKind.Relative));
            saveimageBtn.Text = "保存";
            saveimageBtn.Click += new EventHandler(SaveImage_Click);
            shareimageBtn = new ApplicationBarIconButton(new Uri("/Assets/AppBar/share.png", UriKind.Relative));
            shareimageBtn.Text = "分享";
            shareimageBtn.Click += new EventHandler(ShareImage_Click);

            settingMenu = new ApplicationBarMenuItem("设置");
            aboutMenu = new ApplicationBarMenuItem("关于");

            ChangeAppBar(PageState.Categroy);
            ApplicationBar.Mode = ApplicationBarMode.Minimized;

            ApplicationBar.MenuItems.Add(settingMenu);
            ApplicationBar.MenuItems.Add(aboutMenu);
        }
开发者ID:LaoQi,项目名称:kukukuclient,代码行数:34,代码来源:MainPage.xaml.cs


示例19: loadContent

 public void loadContent()
 {
     IApplicationBar applicationBar = base.ApplicationBar;
     ApplicationBarMenuItem item = new ApplicationBarMenuItem(AppResources.DataSyncViaPcClient);
     item.Click += new System.EventHandler(this.viaPCClientButton_Click);
     applicationBar.MenuItems.Add(item);
 }
开发者ID:RukaiYu,项目名称:TinyMoneyManager.WP8,代码行数:7,代码来源:SkyDriveDataSyncingPage.xaml.cs


示例20: AdvancedApplicationBarMenuItem

 public AdvancedApplicationBarMenuItem()
 {
     ApplicationBarMenuItem = new ApplicationBarMenuItem() { Text = "appbar" }; ;
     RealAppBarItem = ApplicationBarMenuItem;
     AdvancedApplicationBar.AddButton(this);
     ApplicationBarMenuItem.Click += new EventHandler(ApplicationBarMenuItem_Click);
 }
开发者ID:Rakoun,项目名称:librometer,代码行数:7,代码来源:AdvancedApplicationBarMenuItem.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Tasks.MarketplaceReviewTask类代码示例发布时间:2022-05-26
下一篇:
C# Shell.ApplicationBarIconButton类代码示例发布时间: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