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

Watermark Text Box additional content IsBackgroundVisible not working

1 Answer 393 Views
WatermarkTextBox
This is a migrated thread and some comments may be shown as answers.
Remus
Top achievements
Rank 1
Veteran
Remus asked on 17 Jun 2020, 06:56 AM

I'm am trying to create a search with  Watermark Text Box and have a clear button at the end. The problem is that I can't get the background of the button to be transparent.

This is the code that I am using:

<telerikControls:RadWatermarkTextBox Name="SearchBox"
                  Text="{Binding SearchControl.SearchText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                  Width="250">
                    <telerikControls:RadWatermarkTextBox.WatermarkContent>
                        <StackPanel Orientation="Horizontal">
                            <telerikControls:RadGlyph Glyph="" Margin="0 3 0 0"/>
                            <TextBlock Margin="3,3,0,0" Text="Search" />
                        </StackPanel>
                    </telerikControls:RadWatermarkTextBox.WatermarkContent>
                    <telerikControls:RadWatermarkTextBox.AdditionalContent>
                        <telerikControls:RadButton Focusable="False"
                           IsBackgroundVisible="False"
                           Command="telerikControls:RadWatermarkTextBoxCommands.Clear"
                           CommandTarget="{Binding ElementName=SearchBox}"
                           ToolTip="Clear">
                            <telerikControls:RadGlyph Glyph=""/>
                        </telerikControls:RadButton>
                    </telerikControls:RadWatermarkTextBox.AdditionalContent>
                </telerikControls:RadWatermarkTextBox>

 

I have also tried to use Background="Transparent" but that still doesn't work.

I have also noticed that IsBackgroundVisible aslo doesn't work on buttons outside of the Watermark Text Box.

I have attached a photo of how the search box looks.

1 Answer, 1 is accepted

Sort by
0
Sia
Telerik team
answered on 18 Jun 2020, 12:36 PM

Hello,

Having the attached screenshot in mind, it is not clear to me which is the theme that you use. It appears that there is some customization of one our dark themes.

That is why I am sending you a sample project where our VisualStudio2013 theme is set and implicit theming is used. I did not manage to reproduce the described appearance. That is why my suggestion is that some custom style interfere with the IsBackgroundVisible property or it is related to the structure of your work project. Could you please give me more details about the containers outside the WatermarkTextBox control?

Also have in mind that the IsBackgroundVisible property does not hide the MouseOver and the Pressed visuals.

I am looking forward to your reply.

Regards,
Sia
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
WatermarkTextBox
Asked by
Remus
Top achievements
Rank 1
Veteran
Answers by
Sia
Telerik team
Share this question
or