var image =
this
.radRichTextBox.Document.EnumerateChildrenOfType<ImageInline>().First();
if
(image.Height == 10 && image.ImageSource.DecodePixelHeight == 0)
{
image.Height = image.ImageSource.Height;
}
In MS Word there are several options available in the Advanced Find dialog that are not available in the RichTextBox, the two most requested by our users are "Match case" and "Find whole words only".
To reproduce:
- Hold the control key and double click a word
Actual: the entire paragraph is selected
Expected: the current word should be selected, the existing selection should be extended.
A reference in DocumentFragment to RadDocument (CopySource property) can cause a memory after copy-paste between RadDocument.
Workaround:
public static bool ReleaseClipboardExReferences(
RadDocument document)
{
dynamic clipboardEx = new DynamicProxyObject(typeof(ClipboardEx));
if (clipboardEx.documentClipboardData?.CopySource is DynamicProxyObject copySource
&& object.ReferenceEquals(copySource.Instance, document))
{
clipboardEx.documentClipboardData = null;
return true;
}
if (clipboardEx.CopiedDocumentFragment?.Fragment?.CopySource is DynamicProxyObject fragmentCopySource
&& object.ReferenceEquals(fragmentCopySource.Instance, document))
{
clipboardEx.CopiedDocumentFragment = null;
return true;
}
return false;
}
Hello,
In the attached example, applying character formatting to a selection that ends between two annotation ends and undoing the formatting action does not revert the annotations to the exact position as they were before the formatting was applied.
Applying formatting twice and undoing twice crashes the editor because the second undo command inserts unpaired annotations (as it operates on a document state different than the expected one).
The RtfFormatProvider does not take the fonts from the Font.Manager
Workaround:
Unregister all custom fonts and the use the FontSubstituting event to supply the correct fonts:
private void ImportSettings_FontSubstituting(object sender, Telerik.Windows.Documents.FormatProviders.FontSubstitutingEventArgs e)
{
var fonts = Wpf.Fonts.Fonts.GetAllAvailableFonts();
var ff = fonts.Where(x => x.Source == e.OriginalFontName).FirstOrDefault();
e.SubstitutionFontFamily = ff;
}
After the import is complete you can register the fonts again.
When the LayoutMode is set to Flow the size of the numbers is larger than expected.
This behavior is not observed in LayoutMode="Paged".