I have a combobox which has a bound .Text field. When my control first loads, the correct text appears in the box and the box receives focus. When the box loses focus, the value is cleared out. In the LostFocus event handler I can tell that both the .Text property and my corresponding business property have been set to NULL but I can't figure out why. During my troubleshooting I noticed that the "TextInputString" property of the combobox still holds the correct value after .Text is somehow null. Does this mean anything?
I added a GotFocus event, and the weird thing is in that handler the value is still set.
So both .text and the underlying business object property are set properly in GotFocus, but then when I click off the box, in the LostFocus event, they are null.
One more detail, if I trigger LostFocus by clicking out of the window, then the property does not get lost, I guess because the focus is really still on the box. But then if I click on another control it get's lost.
I have probably 50 radComboBoxes all over my application without the issue, so I think it will be hard to duplicate in a standalone project. Below is the xaml definition of my combobox.
<
controls:CustomMenuCombo
x:Name
=
"radCustom1Combo_Flick"
CanKeyboardNavigationSelectItems
=
"True"
Grid.Row
=
"5"
Grid.Column
=
"1"
Text
=
"{Binding Custom1,Mode=TwoWay, FallbackValue=''}"
IsEditable
=
"True"
VerticalAlignment
=
"Top"
SelectAllTextEvent
=
"None"
SelectionChanged
=
"radCustom1Combo_SelectionChanged"
CanAutocompleteSelectItems
=
"True"
IsFilteringEnabled
=
"True"
GotFocus
=
"radCustom1Combo_Flick_GotFocus"
Visibility
=
"Collapsed"
LostFocus
=
"radCustom1Combo_LostFocus"
OpenDropDownOnFocus
=
"False"
Height
=
"24"
/>