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

Text manipulation in WatermarkTextBox

3 Answers 98 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Christie Admin
Top achievements
Rank 1
Christie Admin asked on 06 Jun 2014, 08:48 PM
Hi,

I'm on .Net 4.0 and I use Telerik V2014.1.331.40 and I would like to know how I can access the RadWatermarkTextBox inside the control? For my scenario, I need to do some manipulation on the text inside the RadWatermarkTextBox.

Thank's
Alain

3 Answers, 1 is accepted

Sort by
0
Masha
Telerik team
answered on 09 Jun 2014, 06:44 AM
Hello Alain,

Can you give us more information about what kind manipulation you want to achieve?

If you need to modifye the style of the control you can find all resources in the Themes.Implicit folder under your installation directory. For RadWatermartTextBox, you need to check the Themes.Implicit\OfficeBlack\Themes\Telerik.Windows.Controls.xaml file.

I hope it helps.

Regards,
Masha
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Christie Admin
Top achievements
Rank 1
answered on 09 Jun 2014, 12:06 PM
Hi Masha,

with the RadAutoCompleteBox and I use a AutoCompleteBoxGroupingFilteringBehavior. What I'm trying to do is to filter the contain of the dropdown depending ON which word the carret is into the the AutoCompeteBox.

Let me show an example:

AutoCompleteBox text: Masha Alain User1 User2 User3

So, if the carret is on the "Alain" word, I need to display in the dropdown only the items which contain the "Alain" word. Samething for "Masha". If the user enter the following: "User1 User2 Masha+Alain User3" and the carrte is on "Masha", I need to display in the dropdown on the items containing the "Masha" and "Alain".

Thank's
Alain
0
Rosen Vladimirov
Telerik team
answered on 10 Jun 2014, 02:35 PM
Hello Alain,

In order to find RadWatermarkTextBox inside RadAutoCompleteBox, you can use ChildrenOfType<T> method, for example:
private void RadAutoCompleteBox_Loaded(object sender, RoutedEventArgs e)
{
    var autoCompleteBox = sender as RadAutoCompleteBox;
    if (autoCompleteBox != null)
    {
        var watermark = autoCompleteBox.ChildrenOfType<RadWatermarkTextBox>().FirstOrDefault();
        if(watermark != null)
        {
            // watermark is found!
        }
    }
}

Hope this helps!

Regards,
Rosen Vladimirov
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
AutoCompleteBox
Asked by
Christie Admin
Top achievements
Rank 1
Answers by
Masha
Telerik team
Christie Admin
Top achievements
Rank 1
Rosen Vladimirov
Telerik team
Share this question
or