在不写代码的情况下绑定wpf中的控件有什么用? [英] What is the use of Binding the controls in wpf without writing in code behind ?

查看:75
本文介绍了在不写代码的情况下绑定wpf中的控件有什么用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我是WPF的新手,可以解释在WPF中使用Binding的方法。





在此先感谢.....

Karthik.R

Hi,

I am new to WPF, can any explain the use of Binding in WPF.


Thanks in Advance.....
Karthik.R

推荐答案

嗨Karthik,



数据绑定之前的生命,我们必须编写代码来处理源和目标属性的变化,手动同步两者。通过绑定,框架可以为我们处理这个问题,允许使用更具说明性的方法将我们的UI连接到支持它的模型。



检查出来 http://www.scottlogic.com/blog/2012/04/05/everything-you-wanted-to-know-about-databinding-in-wpf-silverlight-and-wp7-part-one.html [ ^ ]



问候,

Praneet
Hi Karthik,

The life before databinding, we had to write code to handle changes from both the source and target properties, manually synchronizing the two. With binding, the framework handles this for us, allowing for a more declarative approach to wiring-up our UI to the model that backs it.

Check this out http://www.scottlogic.com/blog/2012/04/05/everything-you-wanted-to-know-about-databinding-in-wpf-silverlight-and-wp7-part-one.html[^]

Regards,
Praneet


这篇关于在不写代码的情况下绑定wpf中的控件有什么用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆