Editor for WinForms | ComponentOne
In This Topic
    Quick Start
    In This Topic

    This quick start guides you through the steps of creating a simple Editor application. You begin by creating a Windows Forms App in Visual Studio, adding the Editor control to the Form and loading a document in it.

     

    Follow the given steps to create a simple Editor application in .NET Edition.

    Set Up the Application

    1. Create a new Windows Forms App and set the project framework to .NET 8.0 using Configure your new project window.
    2. Install the C1.Win.Editor package using NuGet Package Manager. The C1Editor control gets added to the Toolbox once the package gets installed.
    3. Drag and drop the C1Editor control from Toolbox onto the Form.

    Load the Document

    To load an HTML document in the Editor control use LoadDocument method of the C1Editor class. In this example, an html document named tesla is loaded in Editor from the C drive. You can change the file path of the document based on the location of the document that you want to load from your system in the Editor control.

    C#
    Copy Code
    c1Editor1.LoadDocument(@"C:\tesla.html");