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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Help Needed on some requirements

Thread ID:

Created:

Updated:

Platform:

Replies:

150539 Jan 10,2020 10:34 AM UTC Feb 24,2020 12:49 PM UTC WPF 15
loading
Tags: SfRichTextBoxAdv
Sudip
Asked On January 10, 2020 10:34 AM UTC

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();
                }
                stream.Close();
                stream.Dispose();
                skipUpdating = false;
            }
        }

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

Premkumar Sundaramoorthy [Syncfusion]
Replied On 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.   

Regards, 
Premkumar 


Sudip
Replied On January 29, 2020 07:24 AM UTC

Hi,

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.

Premkumar Sundaramoorthy [Syncfusion]
Replied On 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.  

Regards, 
Premkumar  


Sudip
Replied On January 31, 2020 03:31 PM UTC

Hi,

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

Sudip
Replied On February 3, 2020 12:31 PM UTC

Hi,

We are getting the following exception and the output screen:

Exception

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.'

Output


Premkumar Sundaramoorthy [Syncfusion]
Replied On 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.   
 
Regards, 
Premkumar  


Sudip
Replied On February 4, 2020 02:06 PM UTC

Hi,

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

Preethi Nesakkan Gnanadurai [Syncfusion]
Replied On February 5, 2020 09:13 AM UTC

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


Sudip
Replied On February 5, 2020 10:27 AM UTC

Hi,

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

Premkumar Sundaramoorthy [Syncfusion]
Replied On 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. 

Regards, 
Premkumar  


Premkumar Sundaramoorthy [Syncfusion]
Replied On 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. 

API
 
 
Class name  
Property name  
Type  
SfRichTextBoxAdv  
FontNames  
ObservableCollection<string>  
 
  
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: 17.4.0.46  
   
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\ 17.4.0.46\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.     
   
Note  
You can change how you receive bug fixes by navigating to the following link and updating your preferences.  
   
   
Disclaimer  
Please note that we have created this patch for version 17.4.0.46 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.   
  
Regards,  
Premkumar


Sudip
Replied On February 18, 2020 07:07 PM UTC

Hi Premkumar,

Thanks for the update. I will check.

Vijayasurya Anandhan [Syncfusion]
Replied On February 19, 2020 05:07 AM UTC

Hi Sudip,

Thank you for your update.

We will wait to hear the testing results.

Regards,
Vijayasurya A


Sudip
Replied On February 21, 2020 02:57 PM UTC

Hi,

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.



Premkumar Sundaramoorthy [Syncfusion]
Replied On 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. 
   
Regards,   
Premkumar 



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon