开发学院图形图像Flash Silverlight专题(16)- 动态设置WCF Service配置... 阅读

Silverlight专题(16)- 动态设置WCF Service配置信息

 2009-02-28 11:56:14 来源:WEB开发网   
核心提示: 1:publicPage()2:{3:InitializeComponent();4:this.Loaded+=newRoutedEventHandler(Page_Loaded);5:}6:7:voidPage_Loaded(objectsender,RoutedEventArgse)8

  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传过来的数据了

Silverlight专题(16)- 动态设置WCF Service配置信息

上一页  1 2 3 4 5  下一页

Tags:Silverlight 专题 动态

编辑录入:爽爽 [复制链接] [打 印]
[]
  • 好
  • 好的评价 如果觉得好,就请您
      0%(0)
  • 差
  • 差的评价 如果觉得差,就请您
      0%(0)
赞助商链接