C# WPF binding 结构体出错
向一个控件绑定结构体的一个子成员时,数值不能更新。
原因见https://www.py4u.net/discuss/758240,https://stackoverflow.com/questions/7714883/why-does-binding-to-a-struct-not-work。简言之,对struct的支持不够。
解决办法是把struct改成class,能设置property的地方都用上property。
向一个控件绑定结构体的一个子成员时,数值不能更新。
原因见https://www.py4u.net/discuss/758240,https://stackoverflow.com/questions/7714883/why-does-binding-to-a-struct-not-work。简言之,对struct的支持不够。
解决办法是把struct改成class,能设置property的地方都用上property。