This is a migrated thread and some comments may be shown as answers.
WatermarkContent Wrapping?
1 Answer 29 Views
This is a migrated thread and some comments may be shown as answers.
Lucas
Top achievements
Rank 1
Lucas asked on 05 Jul 2013, 12:26 PM
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?

1 Answer, 1 is accepted

Sort by
0
Lucas
Top achievements
Rank 1
answered on 05 Jul 2013, 12:33 PM
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>
Asked by
Lucas
Top achievements
Rank 1
Answers by
Lucas
Top achievements
Rank 1
Share this question
or