当前位置: 首页>>代码示例>>C#>>正文


C# Shell.ApplicationBarIconButton类代码示例

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


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

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

示例2: BuildLocalizedApplicationBar

        //生成AppBar
        private void BuildLocalizedApplicationBar()
        {
            // 将页面的 ApplicationBar 设置为 ApplicationBar 的新实例。
            ApplicationBar = new ApplicationBar();
            ApplicationBar.Opacity = 0.78;
            ApplicationBar.IsVisible = true;
            ApplicationBar.IsMenuEnabled = true;

            // 创建新按钮并将文本值设置为 AppResources 中的本地化字符串。
            ApplicationBarIconButton SaveAddAppBarButton = new ApplicationBarIconButton(new Uri("/Images/appbar.save.rest.png", UriKind.Relative));
            SaveAddAppBarButton.Text = AppResources.ViewEditPageAppbarButtonSave;
            SaveAddAppBarButton.Click += AppBar_Save_Click;
            ApplicationBar.Buttons.Add(SaveAddAppBarButton);

            // 创建新按钮并将文本值设置为 AppResources 中的本地化字符串。
            ApplicationBarIconButton EditAddAppBarButton = new ApplicationBarIconButton(new Uri("/Images/appbar.edit.rest.png", UriKind.Relative));
            EditAddAppBarButton.Text = AppResources.ViewEditPageAppbarButtonEdit;
            EditAddAppBarButton.Click += AppBar_Edit_Click;
            ApplicationBar.Buttons.Add(EditAddAppBarButton);

            // 创建新按钮并将文本值设置为 AppResources 中的本地化字符串。
            ApplicationBarIconButton DeleteAddAppBarButton = new ApplicationBarIconButton(new Uri("/Images/appbar.delete.rest.png", UriKind.Relative));
            DeleteAddAppBarButton.Text = AppResources.ViewEditPageAppbarButtonDelete;
            DeleteAddAppBarButton.Click += Appbar_Delete_Click;
            ApplicationBar.Buttons.Add(DeleteAddAppBarButton);


        } 
开发者ID:virtualcca,项目名称:My_Note,代码行数:29,代码来源:ViewEdit.xaml.cs

示例3: MainPage

        // コンストラクター
        public MainPage()
        {
            InitializeComponent();

            // ApplicationBarItemを追加
            this.fileChooseButton = new ApplicationBarIconButton
            {
                IconUri = new Uri("/icons/appbar.folder.rest.png", UriKind.Relative),
                Text = "読み込み"
            };
            this.fileSaveButton = new ApplicationBarIconButton
            {
                IconUri = new Uri("/icons/appbar.save.rest.png", UriKind.Relative),
                Text = "保存",
                IsEnabled = false
            };
            this.aboutItem = new ApplicationBarMenuItem
            {
                Text = "バージョン情報"
            };

            this.ApplicationBar.Buttons.Add(this.fileChooseButton);
            this.ApplicationBar.Buttons.Add(this.fileSaveButton);
            this.ApplicationBar.MenuItems.Add(this.aboutItem);

            this.fileChooseButton.Click += new EventHandler(fileChooseButton_Click);
            this.fileSaveButton.Click += new EventHandler(fileSaveButton_Click);
            this.aboutItem.Click += new EventHandler(aboutItem_Click);
        }
开发者ID:ChiiAyano,项目名称:GoodYeyGenerator,代码行数:30,代码来源:MainPage.xaml.cs

示例4: BuildLocalizedApplicationBar

        // Sample code for building a localized ApplicationBar
        private void BuildLocalizedApplicationBar()
        {
            ApplicationBar = new ApplicationBar();
            ApplicationBar.BackgroundColor = Color.FromArgb(255, 7, 4, 25);
            ApplicationBar.ForegroundColor = Color.FromArgb(255, 255, 255, 255); ;

            #region | Pin Tile AppBar Icon |

            ApplicationBarIconButton PinTile = new ApplicationBarIconButton(new Uri("/Icons/Dark/Pin.png", UriKind.Relative));
            PinTile.Text = "Pin";
            ApplicationBar.Buttons.Add(PinTile);
            PinTile.Click += new EventHandler(PinTile_Click);

            #endregion

            #region | StartStop appBarIcon|

            ApplicationBarIconButton PlayPause = new ApplicationBarIconButton(new Uri("/Icons/Dark/transport.play.png", UriKind.Relative));
            PlayPause.Text = "Start";
            ApplicationBar.Buttons.Add(PlayPause);
            PlayPause.Click += new EventHandler(PlayPause_Click);

            #endregion

            #region | Settings appBarIcon|

            ApplicationBarIconButton Settings = new ApplicationBarIconButton(new Uri("/Icons/Dark/appbar.feature.settings.rest.png", UriKind.Relative));
            Settings.Text = "Settings";
            ApplicationBar.Buttons.Add(Settings);
            Settings.Click += new EventHandler(Settings_Click);

            #endregion
           
        }
开发者ID:ZoyaSaeed,项目名称:MFD,代码行数:35,代码来源:StopWatchPage.xaml.cs

示例5: Leagues

        public Leagues()
        {
            try
            {
                InitializeComponent();
                LoggerMobile.Instance.logMessage("Opening Leagues", Portable.Util.Log.Enums.LoggerEnum.message);
                _viewModel = (LeaguesViewModel)Resources["viewModel"];
                resultListBox.ItemRealized += resultListBox_ItemRealized;
                this.Loaded += new RoutedEventHandler(MainPage_Loaded);
                initialArray = new LeaguesJson();

                ApplicationBar = new ApplicationBar();

                ApplicationBar.Mode = ApplicationBarMode.Default;
                ApplicationBar.Opacity = 1.0;
                ApplicationBar.IsVisible = true;
                ApplicationBar.IsMenuEnabled = true;

                ApplicationBarIconButton searchBtn = new ApplicationBarIconButton();
                searchBtn.IconUri = new Uri("/Assets/Icons/feature.search.png", UriKind.Relative);
                searchBtn.Text = "Search";
                searchBtn.Click += searchBtn_Click;
                ApplicationBar.Buttons.Add(searchBtn);
            }
            catch (Exception exception)
            {
                ErrorHandler.Save(exception, MobileTypeEnum.WP8);
            }
        }
开发者ID:mukhtiarlander,项目名称:git_demo_torit,代码行数:29,代码来源:Leagues.xaml.cs

示例6: Forum

        public Forum()
        {
            InitializeComponent();

            SystemTray.SetProgressIndicator(this, progress);
            m_button = ApplicationBar.Buttons[0] as ApplicationBarIconButton;
        }
开发者ID:hsynlms,项目名称:Creatalk,代码行数:7,代码来源:Forum.xaml.cs

示例7: InitializeApplicationBar

        private void InitializeApplicationBar()
        {
            /***
             * Make sure these buttons are added in the same order as the button names in the
             * enumeration above. Otherwise we don't know which button is where - see GetQuakes().
             **/
            List<ApplicationBarIconButton> buttons = new List<ApplicationBarIconButton>();

            ApplicationBarIconButton zoomOutButton = new ApplicationBarIconButton();
            zoomOutButton.Text = AppResources.AppBarZoomOutButtonText;
            zoomOutButton.IconUri = new Uri("/Icons/appbar.minus.rest.png", UriKind.Relative);
            zoomOutButton.Click += ZoomOutButton_Click;

            ApplicationBarIconButton refreshButton = new ApplicationBarIconButton();
            refreshButton.Text = AppResources.AppBarRefreshButtonText;
            refreshButton.IconUri = new Uri("/Icons/appbar.refresh.rest.png", UriKind.Relative);
            refreshButton.Click += RefreshRecentButton_Click;

            //ApplicationBarIconButton listViewButton = new ApplicationBarIconButton();
            //listViewButton.Text = AppResources.AppBarListViewButtonText;
            //listViewButton.IconUri = new Uri("/Icons/appbar.list.png", UriKind.Relative);
            //listViewButton.Click += ListPageButton_Click;

            ApplicationBarIconButton zoomInButton = new ApplicationBarIconButton();
            zoomInButton.Text = AppResources.AppBarZoomInButtonText;
            zoomInButton.IconUri = new Uri("/Icons/appbar.add.rest.png", UriKind.Relative);
            zoomInButton.Click += ZoomInButton_Click;

            buttons.Add(zoomOutButton);
            buttons.Add(refreshButton);
            //buttons.Add(listViewButton);
            buttons.Add(zoomInButton);

            base.InitializeApplicationBar(buttons);
        }
开发者ID:adamsp,项目名称:wsnz-windowsphone,代码行数:35,代码来源:MapPage.xaml.cs

示例8: OnNavigatedTo

        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            ApplicationBarIconButton addTaskDetailButton = new ApplicationBarIconButton();
            addTaskDetailButton.IconUri = new Uri("/Assets/new.png", UriKind.Relative);
            addTaskDetailButton.Text = "Add New";
            addTaskDetailButton.Click += addTaskDetailButton_Click;
            ApplicationBar.Mode = ApplicationBarMode.Default;
            ApplicationBar.Buttons.Add(addTaskDetailButton);
            if (ApplicationData.IsRedirectedFromTimesheet)
            {
                SetHeaderDate(ApplicationData.CurrentDate);
            }

            ////Show Pending Toast from other pages
            object toastMessage;
            if (PhoneApplicationService.Current.State.TryGetValue("ToastNotification", out toastMessage))
            {
                string message = toastMessage.ToString();
                if (!string.IsNullOrEmpty(message))
                {
                    ShowToastNotification(message);
                    PhoneApplicationService.Current.State["ToastNotification"] = string.Empty;
                }
            }

            base.OnNavigatedTo(e);
        }
开发者ID:JaipurAnkita,项目名称:mastercode,代码行数:27,代码来源:TimesheetTaskDetail.xaml.cs

示例9: MainPage

        public MainPage()
        {
            InitializeComponent();

            ApplicationBar = new ApplicationBar();

            var textureButton = new ApplicationBarIconButton(new Uri("/Assets/Icons/texture.png", UriKind.Relative))
            {
                Text = AppResources.MainPage_TextureButton
            };
            textureButton.Click += TextureButton_Click;

            ApplicationBar.Buttons.Add(textureButton);

            var previousButton = new ApplicationBarIconButton(new Uri("/Assets/Icons/previous.png", UriKind.Relative))
            {
                Text = AppResources.MainPage_PreviousEffectButton
            };
            previousButton.Click += PreviousButton_Click;

            ApplicationBar.Buttons.Add(previousButton);

            var nextButton = new ApplicationBarIconButton(new Uri("/Assets/Icons/next.png", UriKind.Relative))
            {
                Text = AppResources.MainPage_NextEffectButton
            };
            nextButton.Click += NextButton_Click;

            ApplicationBar.Buttons.Add(nextButton);

            var aboutMenuItem = new ApplicationBarMenuItem {Text = AppResources.MainPage_AboutPageButton};
            aboutMenuItem.Click += AboutMenuItem_Click;

            ApplicationBar.MenuItems.Add(aboutMenuItem);
        }
开发者ID:roachhd,项目名称:real-time-blend-demo,代码行数:35,代码来源:MainPage.xaml.cs

示例10: dealWithAppBar

 void dealWithAppBar()
 {
     #region[AppBar1]
     appBar1 = new ApplicationBar();
     appBar1.Mode = ApplicationBarMode.Default;
     appBar1.Opacity = 0.5;
     appBar1.IsVisible = true;
     btnAppBarBack = new ApplicationBarIconButton();
     btnAppBarBack.IconUri = new Uri("/Image_Post/appbar.cancel.rest.png", UriKind.Relative);
     btnAppBarBack.Text = "cancel";
     appBar1.Buttons.Add(btnAppBarBack);
     btnAppBarNext = new ApplicationBarIconButton();
     btnAppBarNext.IconUri = new Uri("/Image_Post/appbar.check.rest.png", UriKind.Relative);
     btnAppBarNext.Text = "ok";
     appBar1.Buttons.Add(btnAppBarNext);
     btnAppBarBack.Click += new EventHandler(btnAppBarBack_Click);
     btnAppBarNext.Click += new EventHandler(btnAppBarNext_Click);
     #endregion
     #region[AppBar2]
     appBar2 = new ApplicationBar();
     appBar2.Mode = ApplicationBarMode.Default;
     appBar2.Opacity = 0.5;
     appBar2.IsVisible = true;
     btnAppBarOK = new ApplicationBarIconButton();
     btnAppBarOK.IconUri = new Uri("/Image_Post/appbar.check.rest.png", UriKind.Relative);
     btnAppBarOK.Text = "ok";
     appBar2.Buttons.Add(btnAppBarOK);
     btnAppBarOK.Click += new EventHandler(btnAppBarOK_Click);
     #endregion
     this.ApplicationBar = appBar2;
 }
开发者ID:Kelin-Hong,项目名称:Becle.Phone,代码行数:31,代码来源:PostPage.xaml.cs

示例11: EditPagePage

        public EditPagePage()
        {
            InitializeComponent();

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

            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);

            _mediaUploadRPCs = new List<UploadFileRPC>();

            Loaded += OnPageLoaded;

            photoChooserTask = new PhotoChooserTask();
            photoChooserTask.ShowCamera = true;
            photoChooserTask.Completed += new EventHandler<PhotoResult>(OnChoosePhotoTaskCompleted);

            uploadImagesAsGalleryCheckbox.Visibility = Visibility.Collapsed;
            gallerySettingsButton.Visibility = Visibility.Collapsed;
        }
开发者ID:timextreasures,项目名称:WordPress-WindowsPhone,代码行数:26,代码来源:EditPagePage.xaml.cs

示例12: WordPage

        public WordPage()
        {
            InitializeComponent();

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

            //ApplicationBarIconButton previousButton = new ApplicationBarIconButton(new Uri("/Images/back.png", UriKind.Relative));
            //previousButton.Text = "previous";
            //previousButton.Click += new EventHandler(previousButton_Click);

            ApplicationBarIconButton backButton = new ApplicationBarIconButton(new Uri("/Images/back.png", UriKind.Relative));
            backButton.Text = "back";
            backButton.Click += new EventHandler(backButton_Click);

            //ApplicationBarIconButton nextButton = new ApplicationBarIconButton(new Uri("/Images/next.png", UriKind.Relative));
            //nextButton.Text = "next";
            //nextButton.Click += new EventHandler(nextButton_Click);

            //ApplicationBar.Buttons.Add(previousButton);
            ApplicationBar.Buttons.Add(backButton);
            //ApplicationBar.Buttons.Add(nextButton);
        }
开发者ID:jojozhuang,项目名称:Projects,代码行数:25,代码来源:WordPage.xaml.cs

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

示例14: MainPage

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

            btnLogout = new ApplicationBarIconButton();

            System.Windows.Media.ImageBrush myBrush = new System.Windows.Media.ImageBrush();
            Image image = new Image();
            
            image.Source = new BitmapImage(new Uri("/Images/bg_hdpi.jpg", UriKind.Relative));
            myBrush.ImageSource = image.Source;
            LayoutRoot.Background = myBrush;

            

            loadSettings();

            SetHeight();
            SetWeight();
            SetAge();
            SetCollar();

            SetArmLength();
            SetBustSize();
            SetHipSize();
            SetWaistSize();
            SetCupSize();

           
        }
开发者ID:nicholasvdb,项目名称:Bivolino_WP8,代码行数:33,代码来源:MainPage.xaml.cs

示例15: GroupDetails

        public GroupDetails()
        {
            InitializeComponent();

            _cmdHome = (ApplicationBarIconButton)
                ApplicationBar.Buttons[0];
        }
开发者ID:nthobois,项目名称:7Pass,代码行数:7,代码来源:GroupDetails.xaml.cs


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