PreviewClosed and TextBox TwoWay binding issues

2 posts, 0 answers
  1. Alex
    Alex avatar
    141 posts
    Member since:
    Mar 2010

    Posted 06 Jun 2011 Link to this post

    I'm currently using hte PreviewClosed to stop the window from closing by doing something like:
    if (.... entities have changes) e.Cancel = true

    However, I've recently noticed that TextBox TwoWay bindings do not get updated until AFTER the PreviewClosed is fired. Are there any easy ways to work around this?
  2. Miroslav Nedyalkov
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 08 Jun 2011 Link to this post

    Hi Alex,

    You are observing this issue because the focusing mechanism of Silverlight, which TwoWay Bindinding depends on, is asynchronous and the binding is not updated when the event occurs. You could add the following code when the PrviewClose event is fired:

    It will force the binding to update.

    Hope this helps.

    Miroslav Nedyalkov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top