Silverlight SelectedItem ComboBox 填充 WCF 服务
首先,对不起我的英语...
我有这样的事情:
public class MyClass
{
private MyOtherClass _other;
public MyOtherClass 其他
{
得到{返回_other; }
设置 { _other = 值; }
}
}
现在...事情是这样的:
我有两个 WCF 服务...一个用于与 MyClass 相关的所有内容,第二个用于与 MyOtherClass 相关的所有内容,所以...我用 MyOtherClass 列表填充组合,但我必须从 MyClass 的属性中设置 SelectedItem,并且这些类的引用不相同。
请,我需要帮助!
谢谢!
First of all, sorry for my English...
I have something like this:
public class MyClass
{
private MyOtherClass _other;
public MyOtherClass Other
{
get { return _other; }
set { _other = value; }
}
}
Now... here is the thing:
I have two WCF services... one for everything related with MyClass, and the second one for everything related with MyOtherClass, so... I fill the combo with a List of MyOtherClass, but I have to set the SelectedItem from the property on MyClass, and the references of those classes are not the same.
Please, I need help!
thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到的解决方案是创建一个新的 Silverlight 类库,其结构与实体类库项目(与 NHibernate 映射的 DataModel 类)相同,这样当我在 Silverlight 应用程序中添加服务引用时,我可以重用这些类,然后再使用 WCF服务不会为我在其上使用的类创建引用。
这里更好地解释:
http://www.netfxharmonics .com/2008/11/Understanding-WCF-Services-in-Silverlight-2#WCFilverlightConnectivityAsync
The solution I found is to create a new Silverlight Class Library with the same structure of the Entities Class Library Project (DataModel classes mapped with NHibernate) so that when I add a Service Reference in my Silverlight Application I can reuse those classes and then the WCF Service don't create a reference for the classes I use on it.
Better explained here:
http://www.netfxharmonics.com/2008/11/Understanding-WCF-Services-in-Silverlight-2#WCFSilverlightConnectivityAsync