WaterMarkTextBox not overriding some styles

2 posts, 0 answers
  1. Sarvesh
    Sarvesh avatar
    1 posts
    Member since:
    Feb 2013

    Posted 19 Feb 2013 Link to this post

    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>


  2. Georgi
    Admin
    Georgi avatar
    349 posts

    Posted 22 Feb 2013 Link to this post

    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.

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top