Hi,
I am encountering a strange problem with SfRichTextBoxAdv: I do update the RichTextBox Content according to the MVVM sample with LoadStream().
I do reuse the control an a WPF page and load the contents like this:
using (Stream stream = new MemoryStream())
{
byte[] bytes = Encoding.UTF8.GetBytes(text); // Convert the text string to byte array.
stream.Write(bytes, 0, bytes.Length); // Writes the byte array to stream.
stream.Position = 0;
Load(stream, format); // Load the stream
}
Sometimes on a successive Load() with an empty (!) string the application hangs and times out with the following error:
Assistent für verwaltetes Debuggen "ContextSwitchDeadlock" ist aufgetreten.
HResult=0x00000000
Nachricht = **Assistent für verwaltetes Debuggen "ContextSwitchDeadlock" :** "The CLR has been unable to transition from COM context 0xbf268170 to COM context 0xbf268048 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."
Any ideas what causes this issue?
And is there anothe way to completely clear the SfRichTextBoxAdv Contents other thal Loading an empty Document? There is no Clear() function.
Regards
Bernd