Моя кнопка привязана к моей ViewModel со свойством IsEnabled, чтобы иметь значение true или false из моей ViewModel, но она не отключается, когда я устанавливаю свойство привязанного к false.
Мой XAML
<Button x:Name="buttonSubmit" Margin="20,10,0,0" Height="30" Width="90" Content="Login" IsEnabled="{Binding IsLoginEnabled, Mode=TwoWay}" Command="{Binding LoginCommand}" CommandParameter="{Binding ElementName=txtPassword}"/>
ViewModel
public LoginViewModel(ILoginAuth loginAuth)
{
this.IsLoginEnabled = true;
this.LoginCommand = new DelegateCommand(this.LoginUser);
}
public async void LoginUser()
{
this.IsLoginEnabled = false;
}