locked
Issue with RichEditBox not growing to the maximum width size RRS feed

  • Question

  • Hello,

    I am facing an issue with the RichEditBox width size.  Basically I have minimum width and maximum width for RichEditBox and when the user types more characters in a line beyond the minimum width I want the RichEditBox to start growing until it reaches maximum width.  I am able to produce the same behavior with minimum height and maximum height of the RichEditBox.  But for some reason I am not able to see the growing behavior with width. 

    Could anyone please help with this issue?  I tried removing text wrap and still seeing the text box not growing to the maximum width.

    Thanks & Regards,

    Kanchana

    Thursday, February 6, 2014 7:49 PM

All replies

  • Hi Kanchana,

    Sorry I cannot reproduce your question both on Win8.0 App and Win8.1 App, I test with following code:

     <RichEditBox MinWidth="200" MaxWidth="500" HorizontalAlignment="Left" Height="178" Margin="161,170,0,0" VerticalAlignment="Top" />

    The width of RichEditBox will automatically growing while the text width is more than 200.

    A possible reason might be there is not enough space for RichEditBox to grow its width, for instance I have a Grid which has 200px width, then no matter how many text I input, the width of the RichEditBox will not change because there is not enough space:

            <Grid Margin="44,39,958,427" Width="200">
                <RichEditBox MinWidth="200" MaxWidth="500" HorizontalAlignment="Left" Height="178"  VerticalAlignment="Top" />
            </Grid>

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    Friday, February 7, 2014 2:55 AM
    Moderator