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!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

1
Vote

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)
{
ContextMenu cm = new();
...create menu items...
_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?

Thank you
Regards.