This is a migrated thread and some comments may be shown as answers.

RadAutoCompleteBox: set focus and display WatermarkContent in the same time

1 Answer 189 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Roman
Top achievements
Rank 1
Roman asked on 18 Oct 2016, 02:46 PM
Hi have some 'hint text' (which I set up by WatermarkContent  property) in my RadAutoCompleteBox. But when I am calling RadAutoCompleteBox.Focus() in my source code, 'hint text' just despairs. How can set focus on control and save 'hint text'?

1 Answer, 1 is accepted

Sort by
0
Accepted
Nasko
Telerik team
answered on 19 Oct 2016, 02:35 PM
Hello Roman,

In order to achieve the desired you need to set the WatermarkBehavior property of the WatermarkTextBox placed inside the AutoCompleteBox to HideOnTextEntered. For that purpose you could use the ChildrenOfType method to get the WatermarkTextBox and set its property.

Please, check the attached sample that demonstrates that approach.

Hope this helps.

Regards,
Nasko
Telerik by Progress
Do you need help with upgrading your WPF project? Try the Telerik API Analyzer and share your thoughts!
Tags
AutoCompleteBox
Asked by
Roman
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Share this question
or