2X faster development
The ultimate WPF UI toolkit to boost your development speed.
WPF RichTextBox (SfRichTextBoxAdv) control allows you to view, edit, and print rich text contents, and also import and export the Html, Xaml, Text files and Word documents (".doc", ".docx", ".rtf"). If you need to add rich user experience as like Windows Presentation Foundation (WPF) to your existing application is in Windows Forms, then it is more effective to embed one or more feature rich WPF controls to your existing Windows Forms application. You can host the Syncfusion SfRichTextBoxAdv WPF control to your existing Windows Forms application using ElementHost in Windows Forms. The following sample demonstrates to host Syncfusion SfRichTextBoxAdv WPF control in Windows Forms application. |
2X faster development
The ultimate WPF UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.
The sample code was helpful. Is there some way to implement a paste event handler on the wpf control in the sample app - to check the paste contents prior to the operation being performed?
In the Form1_Load method, I've tried:
System.Windows.DataObject.AddPastingHandler(RichTextBoxAdv, PasteHandler);
and
RichTextBoxAdv.AddHandler(System.Windows.DataObject.PastingEvent, new System.Windows.RoutedEventHandler(PasteEventHandler), true);
The corresponding methods were as below, but no break point is ever hit in the handlers.
private void PasteEventHandler(object sender, System.Windows.RoutedEventArgs e)
{
var x = sender as SfRichTextBoxAdv;
}
private void PasteHandler(object sender, System.Windows.DataObjectPastingEventArgs e)
{
var x = sender as SfRichTextBoxAdv;
}
Is there something special I need to do when the wpf control is hosted in winforms? Or are only exposed events on the wpf control supported?
Thanks!
Hi Vincent,
Currently our SfRichTextBoxAdv control does not have support for Paste event. Please log on to our support website to check for further updates.
https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents
Regards,
Arumuga Perumal S