Overriding EditorTemplate does not support TextWrapping

2 posts, 0 answers
  1. ITC
    ITC avatar
    19 posts
    Member since:
    Nov 2010

    Posted 05 Dec 2011 Link to this post


    I want to have a textbox property in the property grid that supports multiple lines. I have overridden the EditorTemplate as follows:

    <telerik:PropertyDefinition Binding="{Binding Description}" DisplayName="Description">
                <TextBox Text="{Binding Description, Mode=TwoWay}" TextWrapping="Wrap" VerticalScrollBarVisibility="Visible" AcceptsReturn="true" />

    When I run the code the long text does not wrap as expected.
  2. Ivan Ivanov
    Ivan Ivanov avatar
    1114 posts

    Posted 06 Dec 2011 Link to this post

    Hi Dirk,

    The TextBox won't wrap its text as long as the layout mechanism is "willing" to provide it additional horizontal space. In order to achieve the desired behavior, you should either set MaxWidth value for the TextBox, or disable RadPropertyGrid's horizontal scrolling.

    All the best,
    Ivan Ivanov
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  3. DevCraft R3 2016 release webinar banner
Back to Top