WatermarkContent Wrapping?

2 posts, 0 answers
  1. Lucas
    Lucas avatar
    2 posts
    Member since:
    May 2013

    Posted 05 Jul 2013 Link to this post

    I am attempting to use a RadWatermarkTextBox in a multi-line fashion, with a watermark a couple sentences long, and have found myself unable to get the WatermarkContent to wrap in the same way the normal text does. I have the following xaml declaration:

    <telerik:RadWatermarkTextBox Height="100" VerticalContentAlignment="Top" TextWrapping="Wrap" AcceptsReturn="True" 
    WatermarkContent="Enter new tags here separated by commas. They will all be applied when this window is closed." />

    This declaration gets me the desired text wrapping behavior for text typed in the box, but my WatermarkContent does not wrap, and is cut off. Am I attempting to achieve this behavior in the wrong fashion, or is this behavior not possible with the RadWatermarkTextBox?

  2. Lucas
    Lucas avatar
    2 posts
    Member since:
    May 2013

    Posted 05 Jul 2013 Link to this post

    Forgive me, I had an epiphany immediately after posting my question. WatermarkContent wrapping can be achieved using the following declaration:

    <telerik:RadWatermarkTextBox Height="100" VerticalContentAlignment="Top" TextWrapping="Wrap" AcceptsReturn="True" >
      <telerik:RadWatermarkTextBox.WatermarkTemplate>
        <DataTemplate>
          <TextBlock Text="Enter new tags here separated by commas. They will all be applied when this window is closed." TextWrapping="Wrap" />
        </DataTemplate>
      </telerik:RadWatermarkTextBox.WatermarkTemplate>
    </telerik:RadWatermarkTextBox>
  3. DevCraft banner
Back to Top