error richtextbox and ribbon while typing

Hello,

I am experimenting in WPF with a richtextbox and ribbon.
First, when I use a RibbonWindow I get this error message when I start typing in the richtextbox (see the error description below)

Secondly, I would like to use a Usercontrol instead of a RibbonWindow, can you give me an example


System.NullReferenceException

  HResult=0x80004003

  Message=Object reference not set to an instance of an object.

  Source=Syncfusion.Tools.Wpf

  StackTrace:

   at Syncfusion.Windows.Tools.Controls.Ribbon.FindKeyTips(Dictionary`2& keyTips, UIElement root)

   at Syncfusion.Windows.Tools.Controls.Ribbon.FindKeyTips(Dictionary`2& keyTips, UIElement root)

   at Syncfusion.Windows.Tools.Controls.Ribbon.FindKeyTips(Dictionary`2& keyTips, UIElement root)

   at Syncfusion.Windows.Tools.Controls.Ribbon.FindKeyTips(Dictionary`2& keyTips, UIElement root)

   at Syncfusion.Windows.Tools.Controls.Ribbon.FindKeyTips(Dictionary`2& keyTips, UIElement root)

   at Syncfusion.Windows.Tools.Controls.Ribbon.InitializeKeyTips()

   at Syncfusion.Windows.Tools.Controls.Ribbon.m_ribbonWindow_KeyDown(Object sender, KeyEventArgs e)

   at System.Windows.Input.KeyEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)

   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)

   at System.Windows.Input.InputManager.ProcessStagingArea()

   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)

   at System.Windows.Interop.HwndKeyboardInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawKeyboardActions actions, Int32 scanCode, Boolean isExtendedKey, Boolean isSystemKey, Int32 virtualKey)

   at System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(MSG& msg, Boolean& handled)

   at System.Windows.Interop.HwndSource.CriticalTranslateAccelerator(MSG& msg, ModifierKeys modifiers)

   at System.Windows.Interop.HwndSource.OnPreprocessMessage(Object param)

   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)

   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)

   at System.Windows.Interop.HwndSource.OnPreprocessMessageThunk(MSG& msg, Boolean& handled)

   at System.Windows.Interop.ComponentDispatcherThread.RaiseThreadMessage(MSG& msg)

   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)

   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)

   at System.Windows.Threading.Dispatcher.Run()

   at System.Windows.Application.RunDispatcher(Object ignore)

   at System.Windows.Application.RunInternal(Window window)

   at System.Windows.Application.Run()

   at HomeManager.App.Main()


  This exception was originally thrown at this call stack:

    [External Code]


Attachment: DagboekView.xaml_60bd2ea7.zip

3 Replies

KG Kalaivannan Ganesan Syncfusion Team December 27, 2021 12:42 PM UTC

Hi Ceulemans,

We can reproduce the reported issue with “Exception is thrown on typing in SfRichTextBoxAdv with SfRichTextRibbon” and suspect this to be a defect. and we are working on creating a custom sample to maintain SfRichTextRibbon and SfRichTextBoxAdv under Usercontrol and update you with the custom sample along with validation details on 29th December 2021.


Regards,
Kalaivannan Ganesan
 



KG Kalaivannan Ganesan Syncfusion Team December 29, 2021 02:36 PM UTC

Hi Ceulemans,

 

Exception is thrown on typing in SfRichTextBoxAdv with SfRichTextRibbon

 

This issue has been fixed and included in our latest weekly NuGet V19.4.0.40 which is delivered on 28th December 2021.
 

I would like to use a Usercontrol instead of a RibbonWindow, can you give me an example
 

We have created sample demonstrate how to create
user control with SfRichTextRibbon and SfRichTextBoxAdv. The sample can be downloaded from the following location

https://www.syncfusion.com/downloads/support/forum/171503/ze/RTE-Ribbon-App-1115919869

 

Please let us know if you have any other questions.

Regards,
Kalaivannan Ganesan
 



CE Ceulemans December 30, 2021 08:11 AM UTC

Thanks,

it works perfectly, just what I needed


Loader.
Up arrow icon