This tutorial shows how to create a new .NET 8 Windows Forms application using the TX Text Control and supporting the Ribbon and Sidebar.

Creating the Project

  1. Start Visual Studio and create a new Windows Forms project. In the dialog, select Windows Forms App and click Next.

    Creating the Application

    Enter a name for the project and click Next.

  2. Choose .NET 8 (Long Term Support) as the Framework and click Create.

    Creating the Application

Adding the NuGet Package

  1. Open the Manage NuGet Packages dialog by right-clicking the project in the Solution Explorer and selecting Manage NuGet Packages....

  2. Select Text Control Offline Packages as the Package source and click Browse.

  3. Select TXTextControl.TextControl.WinForms.SDK and click Install.

    Adding the NuGet Package

Adding TX Text Control

  1. In the Solution Explorer, open the form Form1 and find the TX Text Control 32.0 tab in the Toolbox, select it and draw in onto the form.

    Adding TX Text Control

  2. Click on the "Smart Tag" in the upper right corner of TextControl. In the Wizards group, click on Add a Ribbon, Add a Status Bar, Add a Ruler and Add a Vertical Ruler. Finally, click on Arrange Controls Automatically. The controls are now connected and docked to fill the container:

    Adding TX Text Control

  3. On the form, select the ribbon control by clicking the blue File tab title in order to click on the "Smart Tag" in the upper right corner of the ribbon control. Click on Add a RibbonFormattingTab, Add a RibbonInsertTab, Add a RibbonPageLayoutTab and a Add a RibbonViewTab.

    Adding TX Text Control

Adding the Sidebar

  1. Click on the "Smart Tag" in the upper right corner of TextControl again and choose Add Right Sidebar. Click on Arrange Controls Automatically again.

    Adding the Sidebar

  2. Click on the "Smart Tag" in the upper right corner of the sidebar control and choose Styles as the ContentLayout.

    Adding the Sidebar

Running the Application

Press F5 to compile and start the application.

Adding the Sidebar

The application starts and the TX Text Control is connected to the Ribbon and the fully functioning Sidebar.

The Sidebar comes with 10 out-of-the-box content layouts that can be added.

  1. Goto
  2. FieldNavigator
  3. TrackedChanges
  4. Styles
  5. Find
  6. Replace
  7. ConditionalInstructions
  8. DocumentSettings
  9. Comments
  10. About

In addition, you can also add custom content by passing a custom control to the ContentLayout TX Text Control .NET for Windows Forms
Windows.Forms Namespace
Sidebar Class
ContentLayout Property
Determines the content layout that has to be intialized and rendered for the Sidebar.
property.