The vertical and horizontal scrollbar positions get cached during scrolling. If you scroll around and then resize the RadRichTextEditor so that the scrollbars are no longer needed and then you resize the editor again to show the scrollbars, the cached position is used, instead of resetting it to 0,0.
This reproduces when the LayoutMode of the editor i set to FlowNoWrap.
To work this around, reset the scrollbars' Value to 0 on SizeChanged.
private void RadRichTextEditor1_SizeChanged(object sender, EventArgs e)
{
Normalize(radRichTextEditor1.RichTextBoxElement.VerticalScrollBar);
Normalize(radRichTextEditor1.RichTextBoxElement.HorizontalScrollBar);
}
private static void Normalize(RadScrollBarElement sb)
{
int maxUser = Math.Max(sb.Minimum, sb.Maximum - sb.LargeChange + 1);
if (sb.Visibility != ElementVisibility.Visible)
{
sb.Value = sb.Minimum;
return;
}
if (sb.Value > maxUser)
{
sb.Value = maxUser;
}
}
Currently, colors with an alpha channel defined with the 'rgba' function are not respected, for example, the following:
<span style="background-color: rgba(0, 0, 0, 0.5);">Some text</span>
It is imported as black color; semi-transparent colors are exported without the alpha channel.
ADD. RadRichTextBox - add support for line numbering
When changing the theme through ThemeResolutionService.ApplicationThemeName all the application gets changed. Except the ForeColor of the RadRichTextEditor does not get change. Hence the box displays black text on a dark background. Quite unreadable.
Assigning the theme directly in the designer makes everything renders ok.
Sample application attached.
Regrads,
Matthias