Alex Rivera | Logout

What is the use of ConvertBack method in IValueConverter interface?

Asked 2011-06-21T10:50:43.053
53

What is the use of ConvertBack method in the IValueConverter interface.

When will it be called?

Or what is the order of invocation of the Convert and ConvertBack methods?

I have asked the question here because: I have bound one property of codebehind to TEXTBOX’s TEXT Property and am using convertor for that property. The first Convert Method invokes and when I change TEXT in TEXTBOX nothing happens... but as soon as I close the form the ConvertBack method invokes.

Edit
Report

1 Answer

3

check the UpdateSourceTrigger Property on your Binding. http://msdn.microsoft.com/library/system.windows.data.binding.updatesourcetrigger.aspx

The textbox will by default update the source if it looses focus, using the UpdateSourceTrigger you can set this behaviour to immediate update of the source if the textbox content changes.

HTH Dominik

answered 2011-06-21T10:53:55.657

Your Answer