开发者

How can I provide the ServiceURI constructor parameter when instantiating a DomainContext declaratively?

开发者 https://www.devze.com 2023-04-09 02:26 出处:网络
I am trying to use RIA in my Silverlight app to pull down data. The twist is that The URI for server side part of the RIA connection (WCF endpoint) is not on the same web server that served up the web

I am trying to use RIA in my Silverlight app to pull down data. The twist is that The URI for server side part of the RIA connection (WCF endpoint) is not on the same web server that served up the web page with the XAP on it.

I've seen that in code I can use the constructor for the DomainContext to specify a different ServiceURI as follows:

   SomeDomainContext context = new SomeDomainContext(new Uri("http://blah.com/Something.svc"));            
   SomeGrid.DataContext = context.SomeObjects;

But, 开发者_JAVA百科how do I do I specify this parameter when using the declarative syntax?

<riaControls:DomainDataSource AutoLoad="True" d:DesignData="{d:DesignInstance my:Project, CreateList=true}" Height="0" LoadedData="projectDomainDataSource_LoadedData" Name="projectDomainDataSource" QueryName="GetProjectsQuery" Width="0">
     <riaControls:DomainDataSource.DomainContext>
          <my:SomeDomainContext />
     </riaControls:DomainDataSource.DomainContext>
</riaControls:DomainDataSource>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号