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 专题 动态
编辑录入:爽爽 [复制链接] [打 印]- ››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
- ››动态改变 Android 控件大小
- ››动态分区迁移主要准备过程及典型问题分析
- ››动态更改 Android 的屏幕方向
- ››专题功能优化 for V7.5 SP3 优化包
更多精彩
赞助商链接