Back to Devexpress

Get Started

windowsforms-404062-ui-templates-get-started.md

latest3.8 KB
Original Source

Get Started

  • Jan 31, 2024
  • 2 minutes to read

Important

This Early Access Preview (EAP) is provided solely for early testing purposes (C# and Visual Studio 2022 only) and is not ready for production use. Active Universal, DXperience, and WinForms subscribers can download the EAP build via the DevExpress Download Manager.

Technical support for WinForms UI Templates is available if you own the active DevExpress Universal Subscription.

Watch Video

Download & Install

  1. If you are an active Universal, DXperience, or WinForms subscriber, navigate to the the DevExpress Download Manager and download the DevExpress.UITemplates.VSIX.vsix extension.

2. Close all Microsoft Visual Studio windows and install the extension. Double-click the DevExpress.UITemplates.VSIX.vsix file to run the installer. 3. Select the Microsoft Visual Studio 2022 IDE and click Install to proceed.

4. Close the installer window.

Add a Template to Your Project

Note

Save any changes made to your project before adding UI templates.

  1. On the menu bar, choose Tools > Add DevExpress UI Template to open the UI Template Gallery.

2. Choose the UI template and click the corresponding tile.

3. Read the template’s description and click Install to proceed.

4. Click OK and close the window. 5. Reload the updated project.

6. Build the solution (Ctrl+Shift+B).

Get Started with Form Templates

After you have installed a form template, switch to the Solution Explorer. Expand the Forms folder, and double-click a form template to open it in the design window.

The following example shows how to set the Login form as the startup form for your project:

csharp
using DevExpress.UITemplates.Collection.Forms;

// ...
static void Main() {
    Application.EnableVisualStyles();
    Application.SetCompatibleTextRenderingDefault(false);
    using(var frm = new LoginForm()) {
        if(frm.ShowDialog() == DialogResult.OK) {
            if(frm.IsAuthorizationComplete) {
                Application.Run(new Form1());
            }
        }
    }
}

Learn more about Form Templates

Get Started with Control Templates

After you have installed a template, switch to the Toolbox and drop the UI template onto a form.

Learn more about Control Templates