Text is half hidden when RadRichTextBox is only 1 line

2 posts, 0 answers
  1. Michael
    Michael avatar
    41 posts
    Member since:
    Oct 2010

    Posted 16 Aug 2013 Link to this post

    Hi,

    I am using RadRichTextbox for one line input only.  Basically, I want it to work as regular RadTextBox. I need use this control instead of regular RadTextBox for mail merge purposes.  The text is half hidden.  If I resize the window or click inside the textbox it normalizes.  Is there a setting I need to set to fix this or is this a bug?  Any workaround?

    Here is my simple code.  See attached image file to see how it looks.

    <telerik:RadRichTextBox x:Name="radRichTextBox" HorizontalAlignment="Stretch" Height="26" ScrollViewer.VerticalScrollBarVisibility="Disabled" AcceptsReturn="False" AutoInsertHyperlinks="False" LayoutMode="FlowNoWrap" VerticalScrollBarVisibility="Disabled">
                <telerik:RadDocument>
                    <telerik:Section>
                        <telerik:Paragraph>
                            <telerik:Span Text="This is a test"/>
                        </telerik:Paragraph>
                    </telerik:Section>
                </telerik:RadDocument>
            </telerik:RadRichTextBox>
  2. Petya
    Admin
    Petya avatar
    975 posts

    Posted 20 Aug 2013 Link to this post

    Hi Michael,

    Paragraphs as part of RadDocument's structure have some properties that affect the way they look. You can find more about these properties and how to customize them here 

    Basically, the concrete issue at hand is related to the SpacingAfter property which has a default value of 9pt. In order to resolve the issue you can simply set it to 0 either in XAML or code-behind:
    <telerik:RadDocument>
        <telerik:Section>
            <telerik:Paragraph SpacingAfter="0">
                <telerik:Span Text="This is a test"/>
            </telerik:Paragraph>
        </telerik:Section>
    </telerik:RadDocument>

    Let us know if you face other issues or have further questions.

    Regards,
    Petya
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top