RadAutoCompleteBox: set focus and display WatermarkContent in the same time

2 posts, 1 answers
  1. Roman
    Roman avatar
    1 posts
    Member since:
    Oct 2016

    Posted 18 Oct Link to this post

    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'?
  2. Answer
    Nasko
    Admin
    Nasko avatar
    586 posts

    Posted 19 Oct Link to this post

    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!
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top