Hi,
when I override the TextBoxStyle of the RadAutoCompleteBox with my own styledTextBox (according to this suggestion), it results in wired behavior. When I enter the first character the SearchText binding fires twice with empty string. All following keyboard hits trigger the binding once but still with an empty string. The control however displays all entered characters except the first one.
Here's the custom style:
<
Style
x:Key
=
"customStyle"
TargetType
=
"telerik:RadWatermarkTextBox"
>
<
Setter
Property
=
"Template"
>
<
Setter.Value
>
<
ControlTemplate
TargetType
=
"telerik:RadWatermarkTextBox"
>
<
TextBox
Text
=
"{Binding SearchText, RelativeSource={RelativeSource AncestorType=telerik:RadAutoCompleteBox}, Mode=TwoWay}"
/>
</
ControlTemplate
>
</
Setter.Value
>
</
Setter
>
</
Style
>
and the control itself:
<
telerik:RadAutoCompleteBox
ItemsSource
=
"{Binding CustomerSearchProvider}"
SelectedItem
=
"{Binding CustomerSearchProvider.Selected, Mode=TwoWay}"
SearchText
=
"{Binding CustomerSearchProvider.SearchTerm, Mode=TwoWay}"
IsDropDownOpen
=
"{Binding CustomerSearchProvider.IsCompleted}"
DisplayMemberPath
=
"DisplayName"
TextSearchMode
=
"Contains"
SelectionMode
=
"Single"
TextBoxStyle
=
"{StaticResource customStyle}"
>
When I remove the TextBoxStyle, everything works as expected.
Thanks
Matthias