开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜