绑定实体和视图模式= TwoWay [英] Binding entity and view Mode=TwoWay

查看:82
本文介绍了绑定实体和视图模式= TwoWay的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将实体设置为视图的DataContext,然后使用Mode = TwoWay将属性绑定到文本框.如果我在打开键盘的同时输入TextBox并点击应用程序栏按钮,则不会传输文本

I set my entity to the DataContext of a view, then I bind a property to the textbox with Mode=TwoWay. If I type in the TextBox and tap on a application bar button while the keyboard is open, the text is not transmitted to property.

我可以强制传输吗?

推荐答案

我必须将UpdateSourceTrigger设置为PropertyChanged,以便触发每个事件更改.但是在Bidning中,我可以将UpdateSourceTrigger仅设置为Explicit和Default,尽管MSDN为Silverlight/Windows Phone显示了PropertyChanged:http://msdn.microsoft.com/zh-cn/library/system.windows.data.updatesourcetrigger (v = vs.95).aspx
I have to set UpdateSourceTrigger to PropertyChanged so every change a event is fired. But in the Bidning, I can set UpdateSourceTrigger only to Explicit and Default, although MSDN shows PropertyChanged for Silverlight/Windows Phone: http://msdn.microsoft.com/en-us/library/system.windows.data.updatesourcetrigger(v=vs.95).aspx


这篇关于绑定实体和视图模式= TwoWay的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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