如何将 View 模型中定义的委托(delegate)命令绑定(bind)到 c# 中的 xaml Windows Phone 8 应用程序的 ApplicationBarIconButton。 ApplicationBarIconButton 没有 Command 属性。
最佳答案
它有一个 Click
事件。在后面的代码中:
myApplicationBarIconButton.Click += yourDelegate;
或者在 XAML 中:
<shell:ApplicationBar.MenuItems>
<shell:ApplicationBarMenuItem Click="yourDelegate" Text="Yo" />
...
关于c# - 如何将委托(delegate)命令绑定(bind)到 Windows Phone 8 中的 ApplicationBarIconButton,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31851496/