我已将此属性数据绑定到按钮,如下所示,当其他布尔属性更新时如何通知按钮以便再次检查?
数据绑定属性
public bool AccountSelectedAndBankFileSelected
{
get
{
return SelectedAccount != null && SelectedAccount.BankFileSelected;
}
}
按钮
<Button Content="Open bank." IsEnabled="{Binding AccountSelectedAndBankFileSelected}" />
BankFileSelected 属性
public bool BankFileSelected
{
get { return _bankFileSelected; }
set { _bankFileSelected = value; OnPropertyChanged("BankFileSelected"); }
}