Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
250
XamComboEditor updates SelectedItem too many times
posted

When you change the SelectedItem in the editor it sets the bound property multiple times.

It sets it to null and then it sets it to the value that was selected.

If an item is selected and the user sets focus on the control and then tabs out of the control without changing the item then the bound property is set to null and then to the item displayed.

This behaviour is creating a problem for me because I can't ignore null values.  If I put a test for the value being null and ignore it, it is all ok, but unfotunately I need to perform certain actions if the user clears the selected item (sets to null). 

This means I have no way of knowing whether the item was set to null due to the control behaviour or was actually set to null by the user.

I would consider this a bug.

I would have thought that if the user hasn't changed the selected item then the binding of SelectedItem should not be update either.

When the user changes the value from one item to another I woudl have thought there would be one binding update from the old value to the new.  Not from the old value to null then to the new.

Parents Reply Children