WPF Animation with datatriggers

萝らか妹 提交于 2019-12-06 09:29:49

[Caveat: I have not had time to recreate and test this. I just thought it may help.]

The reason that the trigger does not fire is that the value does not change. When you, for instance, keep going up, the value of BidChangeDirectionIndicator remains 1.

Perhaps the simplest thing to do is to set it to another value (0), and then to the value you want.

public void Update(RateInfo rateInfo)
{
    if (rateInfo.Bid != Bid)
    {
        BidChangeDirectionIndicator = Math.Sign(rateInfo.Bid - Bid);
    }            
    else
    {
        BidChangeDirectionIndicator = 0;
        BidChangeDirectionIndicator = rateInfo.Bid;
    }
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!