silverlight datacontext更新问题 [英] silverlight datacontext update problem

查看:82
本文介绍了silverlight datacontext更新问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在数据上下文中更新数据时没有问题。但是,如果我显示任何消息框/ dialouge,那么当我在我的控件中使用静态资源时会出现问题。

即如果我想更新主详细数据,那么我首先在​​我的编辑页面中获取此类数据。这里的主人有三个细节项目。现在我更改了一个详细项目数据,然后在数据上下文中没有问题。因为我的datacontext只有一个变化。但如果我显示任何一个拨号盒,那么我的所有项目都会获得更新状态,否则我不会更改其他项目中的任何数据。

请帮帮我

谢谢

Hi,
There is no problem when update data in data context. But if I show any message box/dialouge then the problem occur when I use static resource in my control.
i.e If I want to update master detail data then I first get such data in my edit page.Here master has three detail items. Now I change one detail item data then there is no problem in the data context. Because there has only one change in my datacontext. But if I show any dialouge box then all of my item get update status else where I do not change any data in other item.
Please help me
Thanks

推荐答案

我已经解决了这个问题。如果我在页面中显示任何子窗口,那么这样的子窗口将禁用后端窗口控件。如果我的父窗口中有任何控件有启用属性(IsEnable ={Binding Path = Object.IsEnbled,Mode = TwoWay})那么当子窗口禁用父控件然后为'mode twoway'属性时,Object.IsEnabled被修改。出于这个原因,我发生了上述问题。



上述问题解决了使用一种方式而不是两种方式。 ie IsEnable ={Binding Path = Object.IsEnbled,Mode = OneWay}
I have solved this problem. If I show any child window in my page then such child window disable the backend window control. If there is any control in my parent window has enable property (IsEnable="{Binding Path=Object.IsEnbled, Mode=TwoWay}") then when child window disable the parent controls then for 'mode twoway' property the Object.IsEnabled modified. For this reason my above problem occurs.

The above problem solved use one way instead of two way. ie IsEnable="{Binding Path=Object.IsEnbled, Mode=OneWay}"


这篇关于silverlight datacontext更新问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆