【发布时间】:2012-12-04 14:53:49
【问题描述】:
那么,我的 manipange.xaml 、应用程序栏声明和按钮声明/定义中都有类似的内容
<phone:PhoneApplicationPage.ApplicationBar>
<shell:ApplicationBar x:Name="xxxx" IsVisible="True" IsMenuEnabled="True">
<shell:ApplicationBarIconButton
x:Name="appBarRegisterButton"
IconUri="/Images/next.png"
Text="Login"
Click="appBarRegisterButton_Click_1" IsEnabled="True"/>
</shell:ApplicationBar>
</phone:PhoneApplicationPage.ApplicationBar>
当我尝试更改其他模型的某些属性时,fe。 这是我的注册模型。
public RegisterViewModel()
{
RegisterTitle = Resources.AppResources.RegisterTitle;
Messenger.Default.Register<RegisterButtonPressed>(this, msg => AttemptToRegister(msg.reg));
}
private void AttemptToRegister(Register reg)
{
reg.appBarRegisterButton.IsEnabled = true;
}
它没有改变,更好的是我的注册按钮是一个空对象,有人知道如何解决这个问题吗? ;/
【问题讨论】:
标签: mvvm-light windows-phone-8 mvvm-toolkit