To integrate a true WYSIWYG document editing into a web application, a client-side control is necessary. 'Rich Text Controls' for ASP.NET were often advertised as WYSIWYG. These plain server-side solutions creating pure HTML and Javascript are simply not powerful enough to render in a true WYSIWYG manner.

TX Text Control Server for ASP.NET (incl. Windows Forms) comes with the BrowserTextControl class. This is a pure .NET assembly that can be integrated into a Windows Forms user control, copied into a folder on server-side and downloaded to the client machine. It is saved automatically in a special download cache folder of Microsoft .NET (the download cache). Based on the code access security of .NET, these assemblies can be embedded and executed in an HTML page of an ASP.NET web application project.

Additionally, it is possible to integrate the BrowserTextControl into a WPF browser application that is deployed as an XBAP application.

These XAML browser applications (XBAP) are using a technique to deploy a WPF application using ClickOnce to client-side.

As of the release of .NET Framework 3.0, XBAPs only run in Internet Explorer. With the new release of .NET Framework 3.5 SP1, they also run in Mozilla Firefox due to a new XBAP extension for Firefox.

To create such an XBAP application, you will need Visual Studio 2008 to create a new WPF browser application project. Additionally, a Windows Forms User Control project must be created like described in our BrowserTextControl documentation.

A Windows Forms Host Control will be placed into a Page of the WPF application. In the constructor of the Page, we can create a new instance of the Windows Forms User Control and attach the user control using the Child property of the hosting interop control:

public Page1()
{
  InitializeComponent();
  TX = new WindowsFormsControlLibrary1.UserControl1();
  windowsFormsHost1.Child = TX;
}

This sample implements a method to load documents into the TX Text Control. Feel free to contact me, if you have any questions or suggestions about this. I look forward to hearing from you.

Download the sample here