Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
240
Text Wrapping - determine if text is actually wrapped?
posted

Hi,

 I am using:

<Style TargetType="{x:Type igEditors:XamTextEditor}">
              <Setter Property="TextWrapping" Value="Wrap"/>
</Style>

to wrap a cell. However I have set the row height to 25. I need to determine if wrapping occurred on each record and if so, set that record's height to 50. Is this possible?

Parents
No Data
Reply
  • 9694
    posted

    Like TextBox, XamTextEditor contains methods for determining how many lines of text are in the editor. The method LineCount will become equal to 2 as soon as text wraps to a second line. You can handle an event (such as TextChanged) and resize the editor once LineCount is greater than 1.

Children