Sample projects on GitHub

    Every feature in this documentation has a runnable project behind it. They live in a public repository: github.com/spicelogic/winforms-html-editor-control-samples, and they are the same projects that ship inside the trial download. Each one is a small Windows Forms application referencing the shipping NuGet package, so there is nothing to wire up and no license key to obtain first - every sample runs on the free trial exactly as it is checked in.

    The sample code is MIT licensed, so you can copy any of it straight into your own application. The control itself remains commercial and is installed from NuGet.

    What is in the repository

    Eleven samples, most of them shipping a C# project and a VB.NET twin side by side in a matching -VB folder, both wired into the same solution.

    • 01-Quickstart - the smallest possible host: dock the editor, set BodyHtml, react to HtmlChanged. Start here to see the control running in under a minute.
    • 02-LoadAndSaveHtml - the practical difference between BodyHtml, which is what you store in a database column, and DocumentHtml, the complete document including the head.
    • 03-PasteFromWord - intercepting the Pasting event to strip Word and Outlook markup, with a before and after view so you can see what was removed.
    • 04-ToolbarCustomization - hiding built-in buttons, relocating editor commands into a toolbar of your own through ToolbarItemOverrider, and adding buttons that act on the document.
    • 05-MailMergeTemplate - registering merge fields, the built-in placeholder toolbar, and previewing a template with a record substituted in.
    • 06-DataBinding - binding BodyHtml and DocumentHtml through a BindingSource to a record, with a navigator and grid, exactly the way you would bind a TextBox.
    • 07-Localization - switching the editor UI language at runtime, and overriding individual strings through a JSON file.
    • 08-CustomSpellChecker - plugging your own spell-check engine in behind the editor's inline checking.
    • 09-CustomDialog - replacing every built-in dialog (image, hyperlink, table, symbol, search, spell check, style builder) with your own, so the editor carries your branding.
    • 10-CustomContextMenu - replacing the right-click menu with your own commands.
    • 11-FullEditorDemo - the wider tour: editor options, high DPI scaling, a persistent user dictionary, and document-level styling.

    Which .NET version you need

    Whichever one your application already uses. The control ships binaries for .NET Framework 4.5, 4.7.2 and 4.8, and for .NET 5, 6, 7, 8, 9 and 10 on Windows, so a long-lived Windows Forms application on .NET Framework 4.8 is a first-class target rather than a compatibility afterthought.

    The samples are checked in targeting net8.0-windows as a default. The target framework lives in a single line of Directory.Build.props at the repository root, which every project inherits, so retargeting the whole set is one edit:

    <TargetFramework>net48</TargetFramework>

    Every sample is verified building on net45, net472, net48, net8.0-windows and net10.0-windows. The one thing .NET Framework needs is the classic startup calls in place of the source-generated ApplicationConfiguration.Initialize(), and each Program.cs already carries that small conditional block, so nothing has to be edited by hand after retargeting.

    Running the samples

    You need Windows and the SDK matching whichever target you build against.

    git clone https://github.com/spicelogic/winforms-html-editor-control-samples.git
    cd winforms-html-editor-control-samples
    dotnet build WinFormsHtmlEditorSamples.sln
    dotnet run --project 01-Quickstart

    You can also open WinFormsHtmlEditorSamples.sln in Visual Studio and set any project as the startup project.

    Building on WPF as well

    The WPF edition has its own sample repository covering MVVM binding, theming, custom dialogs and mail merge: github.com/spicelogic/wpf-html-editor-control-samples. See the WPF HTML Editor control for the product itself.

    Last updated on Aug 12, 2026

    Put this into practice.

    .NET WinForms HTML Editor Control ships with free C# and VB.NET sample projects and a 14-day evaluation.

    Prefer a guided look? Book a free live demo with our engineers - live on Zoom or Teams, never a chatbot.