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


C# ApplicationBar.CreateAndAddMenuItem方法代码示例

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


在下文中一共展示了ApplicationBar.CreateAndAddMenuItem方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RefreshAppBar

		/// <summary>
		/// Refreshes the application bar.
		/// </summary>
		private void RefreshAppBar()
		{
			if (ApplicationBar != null)
			{
				return;
			}

			// Creates the app bar.
			ApplicationBar = new ApplicationBar();

			// Adds the savegame menu item.
			ApplicationBar.CreateAndAddMenuItem(SaveGameCommand, "save game");
		} 
开发者ID:rautava,项目名称:WF.Player.WinPhone,代码行数:16,代码来源:GameHomeViewModel.cs

示例2: RefreshAppBar

		private void RefreshAppBar()
		{
			ApplicationBar = new ApplicationBar();
			ApplicationBar.CreateAndAddMenuItem(ClearHistoryCommand, "clear history");
			ApplicationBar.CreateAndAddMenuItem(SyncProvidersCommand, "sync cartridges");
			ApplicationBar.CreateAndAddMenuItem(CalibrateCompassCommand, "calibrate compass");
			ApplicationBar.CreateAndAddMenuItem(GetHelpCommand, "talk & get support");
		}
开发者ID:rautava,项目名称:WF.Player.WinPhone,代码行数:8,代码来源:HomeViewModel.cs

示例3: RefreshAppBar

		/// <summary>
		/// Refreshes the application bar.
		/// </summary>
		private void RefreshAppBar()
		{
			if (ApplicationBar != null)
			{
				return;
			}

			// Creates the app bar.
			ApplicationBar = new ApplicationBar();

			// Adds the savegame menu item.
			ApplicationBar.CreateAndAddMenuItem(SaveGameCommand, "save game");

			// Adds the device info menu item.
			ApplicationBar.CreateAndAddMenuItem(ShowDeviceInfoCommand, "player+device info");

			// Adds the maps menu item.
			ApplicationBar.CreateAndAddButton("appbar.map.treasure.png", ShowMapCommand, "map");

            // Adds the quick save button.
            ApplicationBar.CreateAndAddButton("appbar.save.png", QuickSaveGameCommand, "quick save");
		} 
开发者ID:WFoundation,项目名称:WF.Player.WinPhone,代码行数:25,代码来源:GameHomeViewModel.cs

示例4: RefreshAppBar

		private void RefreshAppBar()
		{
            ApplicationBar = new ApplicationBar() { Mode = ApplicationBarMode.Minimized };
			ApplicationBar.CreateAndAddMenuItem(ClearHistoryCommand, "clear history");
			ApplicationBar.CreateAndAddMenuItem(SyncProvidersCommand, "sync cartridges");
			ApplicationBar.CreateAndAddMenuItem(ShowDeviceInfoCommand, "device info");
			ApplicationBar.CreateAndAddMenuItem(CalibrateCompassCommand, "calibrate compass");
			ApplicationBar.CreateAndAddMenuItem(GetHelpCommand, "talk & get support");
            ApplicationBar.CreateAndAddMenuItem(SendBugReportCommand, "send bug report");
            ApplicationBar.CreateAndAddMenuItem(ClearCacheCommand, "clear cache");
		}
开发者ID:chier01,项目名称:WF.Player.WinPhone,代码行数:11,代码来源:HomeViewModel.cs

示例5: RefreshAppBar

		private void RefreshAppBar()
		{
            ApplicationBar = new ApplicationBar() { Mode = ApplicationBarMode.Minimized };
			ApplicationBar.CreateAndAddMenuItem(SyncProvidersCommand, "sync cartridges");
			ApplicationBar.CreateAndAddMenuItem(GetHelpCommand, "get support");
            ApplicationBar.CreateAndAddMenuItem(ShowSettingsCommand, "settings");
		}
开发者ID:WFoundation,项目名称:WF.Player.WinPhone,代码行数:7,代码来源:HomeViewModel.cs

示例6: InitAppBar

		private void InitAppBar()
		{
			ApplicationBar = new ApplicationBar() { Mode = ApplicationBarMode.Minimized };

			// Adds a button for compass calibration.
			ApplicationBar.CreateAndAddMenuItem(CalibrateCompassCommand, "calibrate compass");
		}
开发者ID:chier01,项目名称:WF.Player.WinPhone,代码行数:7,代码来源:PlayerViewModel.cs


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