Silverlight数据绑定示例 [英] Silverlight DataBinding Example

查看:113
本文介绍了Silverlight数据绑定示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将我的Silverlight控件与数据绑定,但是我该怎么做,因为使用Dataset无法实现,因此是一个很好的例子.

I want to bind my Silverlight controls with data but how can i do that because it cannot be possible using Dataset so any good example.

推荐答案

在Silverlight中进行绑定时,请勿直接使用数据集.
您可以通过Web服务返回集合,然后将集合中的属性绑定到Silverlight中的控件.

使用INotifyPropertyChanged界面来获取模型的即时更新非常重要(因为您正在xaml网页上更改数据).

有关绑定链接,请参见
Silverlight应用程序中的数据绑定 [ http://www.silverlight.net/learn /data-networking/binding/data-binding-to-controls-%28silverlight-quickstart%29 [ http://www.silverlight.net/learn/data-networking/binding/silverlight-数据绑定 [ ^ ]

好的视频此处 [
You don''t use a dataset directly when you do binding in Silverlight.
You return a collection via a web service and then bind properties in the collection to controls in Silverlight.

It is important to use the INotifyPropertyChanged interface to get instant updates to your model (as you are changing data on the xaml web page).

For binding links, refer
Databinding in Silverlight applications[^]
http://www.silverlight.net/learn/data-networking/binding/data-binding-to-controls-%28silverlight-quickstart%29[^]
http://www.silverlight.net/learn/data-networking/binding/silverlight-data-binding[^]

A good video here[^].


这篇关于Silverlight数据绑定示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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