Silverlight专题(16)- 动态设置WCF Service配置信息
2009-02-28 11:56:14 来源:WEB开发网 1: public Page()
2: {
3: InitializeComponent();
4: this.Loaded += new RoutedEventHandler(Page_Loaded);
5: }
6:
7: void Page_Loaded(object sender, RoutedEventArgs e)
8: {
9: ProductServiceClient client=new ProductServiceClient();
10: this.Cursor = Cursors.Hand;
11: client.RetreiveDataAsync();
12: client.RetreiveDataCompleted += (sender2, e2) =>
13: {
14: if (e2.Cancelled == false && e2.Error == null)
15: {
16: ObservableCollection<ProductInfo> products = e2.Result;
17: this.ProductLBCtl.ItemsSource = products;
18: this.Cursor = Cursors.Arrow;
19: }
20: };
21: }
这样我们就可以获得到WCF Service传过来的数据了
Tags:Silverlight 专题 动态
编辑录入:爽爽 [复制链接] [打 印]- ››动态的改变IFrame的高度
- ››动态4种方法加载JS脚本
- ››silverlight全屏显示图片
- ››Silverlight MVVM 模式(一) 切近实战
- ››Silverlight for Windows Phone 7开发系列(1):...
- ››Silverlight for Windows Phone 7开发系列(2):...
- ››Silverlight for Windows Phone 7开发系列(3):...
- ››Silverlight for Windows Phone 7开发系列(4):...
- ››动态调用对象事件
- ››动态创建控件支持事件响应并可保存与读取
- ››Silverlight for Symbian
- ››动态截获并显示窗口DC
更多精彩
赞助商链接