When a content control check box updates it state at run-time, any local formatting is lost.
Workaround: Formatting defined in style definition is properly kept.
The paste options popup stays visible when the window is deactivated
Workaround:
private void MainWindow_Deactivated(object sender, EventArgs e)Depending on the current layout of the document, invoking SetPosition() for a specific location might result in positioning the caret on the line prior to the expected one.
Steps to reproduce:
radRichTextBox.Insert("one: ");
radRichTextBox.Insert(Environment.NewLine);
radRichTextBox.Insert("two: ");
radRichTextBox.Insert(Environment.NewLine);
radRichTextBox.Insert("tree: ");
radRichTextBox.Insert(Environment.NewLine);
radRichTextBox.Insert("four: ");
radRichTextBox.Insert(Environment.NewLine);
radRichTextBox.Insert("five: ");
radRichTextBox.Insert(Environment.NewLine);
radRichTextBox.Insert("seks: ");
radRichTextBox.Insert(Environment.NewLine);
radRichTextBox.Insert("seven: ");
radRichTextBox.Insert(Environment.NewLine);
radRichTextBox.Insert("eitgh: ");
radRichTextBox.Insert(Environment.NewLine);
radRichTextBox.Insert("nine: ");
radRichTextBox.Insert(Environment.NewLine);
radRichTextBox.Insert("ten: ");
radRichTextBox.Document.CaretPosition.SetPosition(radRichTextBox.Document.CaretPosition.Location); radRichTextBox.Focus();
Observed: The caret is positioned after "eitgh:"
Expected: The caret shouldn't change its position
The DeepCopy method does not copy the font of the predefined table styles
Workaround:
var fragment = new DocumentFragment(radRichTextBox.Document);
radRichTextBox.Document = new RadDocument();
DefaultStyleSheet.Instance.ApplyStylesheetToDocument(radRichTextBox.Document);
radRichTextBox.InsertFragment(fragment);
Here we are:
HtmlFormatProvider htmlProvider = new HtmlFormatProvider();
htmlProvider.ExportSettings.StylesExportMode = StylesExportMode.Inline;
string _html =
@"
<html>
<head>
<meta http-equiv=""Content-Type"" content=""text/html; charset=utf-8"">
</head>
<body>
<div name=""divtagdefaultwrapper"" style=""font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0"">
<div class=""WordSection1"">
<p class=""MsoNormal"" style=""text-autospace:none"">
<span style=""font-size:11pt; color:rgb(31,73,125)"">
I am out of office, please contact Aaaaaa Bbbbbbb (Tel: +1-234-567-8900/email:
<a href=""mailto:aaaaaa.bbbbbb@zzz.com"">aaaaaa.bbbbbb@zzz.com</a>) for assistance
</span>
</p>
</div>
</div>
</body>
</html>
";
RadDocument _doc = htmlProvider.Import(_html);
radRichTextBox.Document = _doc;
And here is an exception:
System.NullReferenceException