Working with the RadContextMenu that comes from the RadRichTextBoxUI, when having analytics enabled, produces a NullReferenceException.
Manually set the Menu property on the PreviewMouseLeftButtonUp event of the RadMenuItem:
static MainWindow()
{
EventManager.RegisterClassHandler(typeof(RadMenuItem), PreviewMouseLeftButtonUpEvent, new MouseButtonEventHandler(OnRadMenuItemPreviewMouseLeftButtonUp), true);
}
private static void OnRadMenuItemPreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
RadMenuItem radMenuItem = (RadMenuItem)sender;
RadContextMenu radContextMenu = radMenuItem.ParentOfType<RadContextMenu>();
if (radContextMenu != null)
{
PropertyInfo menuPropertyInfo = radMenuItem.GetType().GetProperty("Menu", BindingFlags.Public | BindingFlags.Instance);
if (menuPropertyInfo != null)
{
MethodInfo setMethod = menuPropertyInfo.GetSetMethod(true);
if (setMethod != null)
{
Application.Current.Dispatcher.BeginInvoke(new Action(() =>
{
setMethod.Invoke(radMenuItem, new object[] { radContextMenu });
}), System.Windows.Threading.DispatcherPriority.Background);
}
}
}
}
RichTextBox: Bullet list with several levels is not viewed correctly in WordPad.
In Word, this works as expected. When the document is imported into RadRichTextBox, this works as well.
Bold/Italic does not work for some font styles.
This might be a framework limitation in WPF: https://www.telerik.com/forums/some-fonts-are-not-able-to-bold-italic
Sample fonts list:
Currently, the only customization that can be performed is using HyperlinkToolTipFormatString property of RadRichTextBox, which sets the format for all hyperlinks in the document of the control. It would be nice if it were possible to be able to set different tooltips.
It seems that the first time a Center TextAlignment is applied to the selection, its length is cached. Because of this, when the selection content (text) changes the length is not updated, thus the text doesn't align properly. It aligns accord to the initial length of the context. The content doesn't update also if the alignment is reset.
To work this around, avoid the FlowNoWrap layout mode and use only Flow.
Implement child dialogs for Style Formatting Properties Dialog. This will allow users to modify Style's properties related to font properties, paragraph properties, tabs, numbering and borders.
