We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Help Needed on some requirements

Some times when I right-click on SfRichTextBoxAdvExtension editor to open the context menu the application is getting unresponsive and throwing the exception as a thread is taking longer than expected to execute on "RicTextBoxAdv_ContentChanged" which in turn cause the application to crash. Following is the method implementation in class "SfRichTextBoxAdvExtension":

        /// <summary>
        /// Called when content changes in SfRichTextBoxAdv.
        /// </summary>
        /// <param name="obj"></param>
        /// <param name="args"></param>
        void RicTextBoxAdv_ContentChanged(object obj, ContentChangedEventArgs args)
            if (this.Document != null)
                // To skip internal updation of document on setting HtmlText property.
                skipUpdating = true;
                Stream stream = new MemoryStream();
                // Serialize the document as Rtf Format into stream.
                this.Save(stream, FormatType.Rtf);
                stream.Position = 0;
                // Reads the Rtf text from the stream.
                using (StreamReader reader = new StreamReader(stream))
                    this.RtfText = reader.ReadToEnd();
                skipUpdating = false;

Can you help us to find the root cause of this problem and provide some solution on this matter?

15 Replies

PS Premkumar Sundaramoorthy Syncfusion Team January 13, 2020 07:26 AM UTC

Hi Sudip, 

Thank you for using Syncfusion products, 

We have tried to reproduce the reported issue in below attached sample. But we don’t face any exceptions while editing the content and opening context menu. And we suspect that this issue is occurs content (input document) and application specific. So, please modify the attached sample or share your application with input document and replication steps.   


SU Sudip January 29, 2020 07:24 AM UTC


This is to inform that this issue is not occurring in any of my physical devices. But when I try to install my application in Azure Virtual Machine it's start causing problems with opening the context menu in SfRichTextBoxAdv and the application becomes unresponsive which ultimately results in termination. Any help on this will be appreciated. Thanks in advance.

PS Premkumar Sundaramoorthy Syncfusion Team January 30, 2020 12:08 PM UTC

Hi Sudip, 

Thanks for the update, 

We are working for setup a similar environment (Azure Virtual Machine) to test our control. We will check and update you the further details on 3rd February 2020.  


SU Sudip January 31, 2020 03:31 PM UTC


Please let me know your finding by Monday positively as we have a demo on the next day.

SU Sudip February 3, 2020 12:31 PM UTC


We are getting the following exception and the output screen:


Managed Debugging Assistant 'ContextSwitchDeadlock' : 'The CLR has been unable to transition from COM context 0x10f57e8 to COM context 0x10f5730 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations.'


PS Premkumar Sundaramoorthy Syncfusion Team February 3, 2020 01:58 PM UTC

Hi Sudip, 
We have tested the previously attached application in azure virtual machine, but we couldn’t reproduce the reported issue. And the provided exception is seeming to be threading related. So, kindly share the reproduceable sample with replication steps to reproduce the issue from our end.   

SU Sudip February 4, 2020 02:06 PM UTC


Thanks for the update. I have fixed the issue. The exception occurred because I was overwriting the mini-toolbar to show only two fonts.

PN Preethi Nesakkan Gnanadurai Syncfusion Team February 5, 2020 09:13 AM UTC

Hi Sudip, 
We are glad that your issue has been fixed. 

SU Sudip February 5, 2020 10:27 AM UTC


Since the issue occurred due to overwriting the mini-toolbar control and my requirement is to show only two fonts, kindly help me to achieve the requirement without overriding the control.
The customization provided regarding this requirement is attached below in MainWindow.xaml file.


Attachment: CUSTOM_11203047008_14a7fc31.zip

PS Premkumar Sundaramoorthy Syncfusion Team February 6, 2020 09:24 AM UTC

Hi Sudip, 

Thank you for helping us to define this feature. We have added your requirement (support for change font family collection) to our feature request list. And the patch for this feature is estimated to be available on 02/18/2020. 

Please let us know if have any other questions. 


PS Premkumar Sundaramoorthy Syncfusion Team February 18, 2020 12:26 PM UTC

Hi Sudip,      
Thank you for your patience,    
As promised earlier, we have added support to change the font family collection in SfRichTextBoxAdv and the patch for this feature can be downloaded from the following link.  
Recommended approach - exe will perform automatic configuration  
Please find the patch setup from below location:  
Advanced approach – use only if you have specific needs and can directly replace existing assemblies for your build environment  
Please find the patch assemblies alone from below location:    
NuGet packages  

Now you can change font family list through provided API. Please find the API and its usage details from the following table. 

Class name  
Property name  
Code example  
richTextBox.FontNames = new ObservableCollection<string>() { "Calibri", "Arial","Algerian" };  

For more assistance, we have created a sample to demonstrate the same, which can be downloaded from the following link  
Assembly Version:  
Installation Directions:   
This patch should replace the files “Syncfusion.SfRichTextBoxAdv.WPF” under the following folder.  
$system drive:\Program Files (x86) \Syncfusion\Essential Studio\WPF\$Version # \precompiledassemblies\4.6  
Eg : $system drive:\Program Files (x86)\Syncfusion\Essential Studio\WPF\\precompiledassemblies\4.6  
To automatically run the Assembly Manager, please check the Run assembly manager checkbox option while installing the patch. If this option is unchecked, the patch will replace the assemblies in precompiled assemblies’ folder only. Then, you will have to manually copy and paste them to the preferred location, or you will have to run the Syncfusion Assembly Manager application (available from the Syncfusion Dashboard, installed as a shortcut in the Application menu) to re-install assemblies.     
You can change how you receive bug fixes by navigating to the following link and updating your preferences.  
Please note that we have created this patch for version specifically to resolve the issues reported in this forum #150539. And we have plan to include this fix in our upcoming Volume 1 main release which will we estimated to delivery on mid of March 2020 tentatively.   
If you have received other patches for the same version for other products, please apply all patches in the order received.  
Please let us know if you have any other question.   

SU Sudip February 18, 2020 07:07 PM UTC

Hi Premkumar,

Thanks for the update. I will check.

VA Vijayasurya Anandhan Syncfusion Team February 19, 2020 05:07 AM UTC

Hi Sudip,

Thank you for your update.

We will wait to hear the testing results.

Vijayasurya A

SU Sudip February 21, 2020 02:57 PM UTC


I was looking at the fix provided for showing only specific fonts in the sample code but it always shows all fonts although only three fonts were binded to the FontNames property. Please find below the screenshot for the reference.

PS Premkumar Sundaramoorthy Syncfusion Team February 24, 2020 12:49 PM UTC

Hi Sudip, 

Thanks for Contacting Syncfusion support.
Based on the shared screenshot from your end, we confirm that the provided patch is working fine as expected. We have also cross-checked and ensured the same in our end. On further analysing the previously shared sample, we can't reproduce the reported issue in our end while using the following steps.
1. While running the provided sample, initially all the fonts will be listed in the mini toolbar. 
2. Once the ChangeFontNames button is triggered, it will show only three fonts. 

For more reference, please refer to the following video illustration. 
Please follow the above replication steps in the provided video, if you continue to face the same issue, then please revert to us, thereby we will arrange the web meeting with you to resolve this issue. 
Please let us know if you have any questions. 

Live Chat Icon For mobile
Up arrow icon