开发者

How can I know if WPF binding will happen?

I've got a TextBox whose Text property is bound to a property on my view 开发者_如何学Cmodel on LostFocus event. I've noticed that when I move out of this TextBox without changing the value that was already in there, the binding does not happen.

I've got a PreviewKeyDown event handler on the TextBox to handle Enter, Up/Down arrow key presses so that I can move the focus onto other fields on my screen appropriately. Before moving the focus onto another field, I'd like to know whether or not this action will trigger the data binding.

Are there any methods/properties that I can call inside this handler before focus is lost on the textbox (e.g. on the TextBox or on the Binding itself) that will let me know whether the binding will be triggered on the Textbox once focus is lost?


Does your binding implement the following?

UpdateSourceTrigger=LostFocus

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜