Welcome to the WPF feedback portal. We’re happy you’re here! If you have feedback on how to improve the WPF, we’d love to hear it!>
Thanks for joining our community and helping improve Syncfusion products!
Hello,
I'm getting a NullReferenceException at SfRichTextBoxAdv.OnContextMenuOpening when using a custom contextmenu for the SfRichTextBoxAdv.
StackTrace :
System.NullReferenceException: Object reference not set to an instance of an object.
at Syncfusion.Windows.Controls.RichTextBoxAdv.SfRichTextBoxAdv.OnContextMenuOpening(ContextMenuEventArgs e)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
The code that produced this:
private void OnLoaded(object sender, RoutedEventArgs e)
{
...create menu items...ContextMenu cm = new();
_textBox.ContextMenu = cm;
}
Then when using the app, when a word is underlined by spellchecker, the right click on the word raises the exception.
Can you check this?