Products Technologies Demo Docs Blog Support Company

Deploying TX Spell .NET in an XBAP Browser Application

XBAP enables deploying full WPF applications in the browser via .NET Framework. This tutorial covers creating a WPF Browser Application project, configuring TXSpellChecker in Page.Resources, bundling Hunspell dictionary files as content, enabling full trust security, and publishing.

Deploying TX Spell .NET in an XBAP Browser Application

XBAP is a very smart way to deploy full .NET Framework WPF applications in the browser. With .NET 3.5 and 4.0, that means MS Internet Explorer and Firefox. Of course, TX Spell .NET for WPF and the dictionaries can be deployed as part of an XBAP application as well. The following tutorial shows how to accomplish this task.

  1. Start Visual Studio 2010 and create a new WPF Browser Application.

    New XBAP Web Application
  2. Build a TX Text Control based application by following this tutorial from the
    TX Spell .NET for WPF documentation:

    Tutorial: Starting with Microsoft Visual Studio 2010 and TX Text Control

    Ensure to add the TXSpellChecker component to the Page.Resources instead of the Window.Resources. An XBAP Browser Application has Pages and not Windows.

    <Page.Resources>
      <spell:TXSpellChecker x:Key="txSpellChecker1"></spell:TXSpellChecker>
    </Page.Resources>

Given that you created a running application with TX Text Control .NET for WPF and TX Spell .NET for WPF, follow these steps to finalize your XBAP deployable application.

  1. Create a new folder by selecting the project in the Solution Explorer and choosing New Folder from the Project main menu. Name that new folder "Dictionaries".

  2. Select this folder in the Solution Explorer and choose Add Existing Item... from the Project main menu. In the opened dialog, navigate to the Dictionaries folder of the TX Spell .NET for WPF installation path. The default path is:

    C:\Program Files\Text Control GmbH\TX Spell 2.0 .NET for WPF\Assembly\Dictionaries

    Select the dictionary files you want to deploy and confirm with Add.

  3. Select Add Existing Item... from the Project main menu. In the opened dialog, navigate to the TX Text Control installation folder, select all files from the Assembly\bin subfolder and confirm with Add. The default installation folder of TX Text Control can be found here:

    C:\Program Files\Text Control GmbH\TX Text Control 17.0.NET for WPF\

  4. Select all newly added files (including the dictionaries) in the Solution Explorer and set the Build Action property to Content and the Copy to Output Directory to Copy always.

    New XBAP Web Application New XBAP Web Application
  5. Now, open the Project Properties... by selecting the project in the Solution Explorer and clicking the appropriate menu item in the Project main menu. On the Security tab page, select "This is a full trust application".

    New XBAP Web Application
  6. Open the Publish tab page and click on the Application Files button. Set the Publish Status of the TXSpell.dll, TXSpell.WPF.dll, TXTextControl.dll and TXTextControl.WPF.dll to Include and confirm with OK.

    New XBAP Web Application
  7. As the last step, select Publish [Projectname] from the Build main menu, follow the steps in the Publish Wizard and confirm with Publish.

Stay in the loop!

Subscribe to the newsletter to receive the latest updates.

Related Posts

Spell CheckingTechnical Article

TX Spell: Performance Considerations

TX Spell .NET benchmarks demonstrate approximately 75,000 words checked per second and suggestion generation in under 0.035 seconds per word using the US English dictionary. This linear…


Windows FormsWPFRelease

Service Pack 1 for TX Spell .NET 7.0 Released

Text Control released Service Pack 1 for TX Spell .NET 7.0, covering both the Windows Forms and WPF editions. The update addresses known issues since the initial release. Users should review the…


CloudReportingReportingCloud

Proofing Tools Available As ReportingCloud Web API Endpoints

ReportingCloud introduces three proofing Web API endpoints for cloud-based spell checking. The proofing/check endpoint detects misspelled words and duplicates, proofing/suggestions returns ranked…


HyphenationServerTextControlSpell Checking

Using TX Spell .NET with ServerTextControl

TX Spell .NET integrates with ServerTextControl for server-side spell checking by referencing TXSpell.dll and updating the licenses.licx file. After creating a TXSpell instance and assigning it to…


HTML5Spell Checking

HTML5: Enable Spell Checking Using Javascript

TX Spell .NET spell checking is disabled by default in Web.TextControl. A JavaScript command after the ribbonTabsLoaded event enables it on load. TX Spell .NET must be installed on the server, and…

Share on this blog post on: