阅读背景:

在另一个类中更改先决条件属性时,为依赖属性引发PropertyChanged?

来源:互联网 

I have this Bank class:

我有这个班级:

public class Bank : INotifyPropertyChanged
{
    public Bank(Account account1, Account account2)
    {
        Account1 = account1;
        Account2 = account2;
    }

    public Account Account1 { get; }
    public Account Account2 { get; }

    public int Total => Account1.Balance + Account2.Balance;

    public event PropertyChangedEventHandler PropertyChanged = delegate { };

    public void RaisePropertyChanged([CallerMemberName] string propertyName = null)
    {
        PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
    }
}
public clas



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: