将数据绑定到Class [英] Bind data to Class
本文介绍了将数据绑定到Class的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
希望得到一些帮助。
推荐答案
该类应该在属性中托管(在DataContext对象中)。 假设您在属性theClass中命名该类的实例。 然后你只需要使用语法:
The class should be hosted (in the DataContext object) in a property. Lets say you name the instance of the class in property theClass. Then you would just use the syntax:
Text =" {Binding theClass.whateverpropertyyouwanttouse}"
Text="{Binding theClass.whateverpropertyyouwanttouse}"
这篇关于将数据绑定到Class的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文