Windows Phone 8.1 中的命令栏
Commandbar in Windows Phone 8.1
如何在 windows phone 8.1 (winprt) 应用程序中使用 C# 创建辅助命令?
//WINRT:
CommandBar CommandBarObject = new CommandBar();
AppBarButton FirstBtn = new AppBarButton() { Icon = new BitmapIcon() { UriSource = new Uri("ms-appx:///Assets/first.png") } };
FirstBtn.Label = "First";
FirstBtn.Click += FirstBtn_Click;
FirstBtn.IsEnabled = true;
CommandBarObject.PrimaryCommands.Add(FirstBtn);
CommandBarObject.SecondaryCommands.Add(secondaryCommand);
现在如何制作此 secondaryCommand?
放在那里AppBarButton:
CommandBar CommandBarObject = new CommandBar();
AppBarButton FirstBtn = new AppBarButton() { Icon = new BitmapIcon() { UriSource = new Uri("ms-appx:///Assets/first.png") } };
FirstBtn.Label = "First";
FirstBtn.Click += FirstBtn_Click;
FirstBtn.IsEnabled = true;
AppBarButton secondaryCommand = new AppBarButton() { Label = "Second", IsEnabled = true } };
secondaryCommand.Click += FirstBtn_Click;
CommandBarObject.PrimaryCommands.Add(FirstBtn);
CommandBarObject.SecondaryCommands.Add(secondaryCommand);
如何在 windows phone 8.1 (winprt) 应用程序中使用 C# 创建辅助命令?
//WINRT:
CommandBar CommandBarObject = new CommandBar();
AppBarButton FirstBtn = new AppBarButton() { Icon = new BitmapIcon() { UriSource = new Uri("ms-appx:///Assets/first.png") } };
FirstBtn.Label = "First";
FirstBtn.Click += FirstBtn_Click;
FirstBtn.IsEnabled = true;
CommandBarObject.PrimaryCommands.Add(FirstBtn);
CommandBarObject.SecondaryCommands.Add(secondaryCommand);
现在如何制作此 secondaryCommand?
放在那里AppBarButton:
CommandBar CommandBarObject = new CommandBar();
AppBarButton FirstBtn = new AppBarButton() { Icon = new BitmapIcon() { UriSource = new Uri("ms-appx:///Assets/first.png") } };
FirstBtn.Label = "First";
FirstBtn.Click += FirstBtn_Click;
FirstBtn.IsEnabled = true;
AppBarButton secondaryCommand = new AppBarButton() { Label = "Second", IsEnabled = true } };
secondaryCommand.Click += FirstBtn_Click;
CommandBarObject.PrimaryCommands.Add(FirstBtn);
CommandBarObject.SecondaryCommands.Add(secondaryCommand);