This is a migrated thread and some comments may be shown as answers.
WaterMarkTextBox not overriding some styles
1 Answer 37 Views
This is a migrated thread and some comments may be shown as answers.
Sarvesh
Top achievements
Rank 1
Sarvesh asked on 19 Feb 2013, 08:28 AM
Hi

I am using telerik watermarktextbox for a WPF application, I set windows 8 theme when application starts up, now I wanted to have the water mark text box to have my templated text with Segeo Font , italic and text color to be white. Both the text to be entered and the watermark content should be using Segoe WP Light , font size 10 and styled to be italic and text foreground color to be italic.

Unfortunately the water mark text does not apply this setting, however when i type some text they are according to the setting which i specified as Segoe WP Light , font size 10 ,  style to be italic.

Strange behavior is that if i change the textblock foreground to yellow for example then it works, why doesn't it work for white.

Please note that my background is black.

Let me know if its a bug or i am doing something incorrect.

<telerik:RadWatermarkTextBox FontFamily="Segoe WP Light" FontSize="12" Foreground="White" FontStyle="Italic" CaretBrush="White" Background="Transparent" Height="20" BorderThickness="0" WatermarkBehavior="HideOnClick" Margin="3,0,3,0" Grid.Column="1" x:Name="radRichTextBox" VerticalAlignment="Center">

<telerik:RadWatermarkTextBox.WatermarkTemplate>

<DataTemplate>

<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" FontFamily="Segoe WP Light" FontSize="12" Foreground="White" FontStyle="Italic" Text="Enter custom status"></TextBlock>

</DataTemplate>

</telerik:RadWatermarkTextBox.WatermarkTemplate>

</telerik:RadWatermarkTextBox>


1 Answer, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 22 Feb 2013, 09:13 AM
Hi Sarvesh,

The issue occurs because inside the ControlTemplate of RadWatermarkTextBox is set Opacity=0.5 to the content control named WatermarkVisualElement. In order to have the white watermark you should remove the opacity.

I hope this helps.

Regards,
Georgi
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Asked by
Sarvesh
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Share this question
or