Skip to content
Robin edited this page Jan 5, 2016 · 19 revisions

Getting started

To begin using DarkUI within a WinForms project simply reference it within Visual Studio.

References

DarkUI consists of the following namespaces. Reference these within the files you'd like to use the various controls and components.

using DarkUI.Collections;
using DarkUI.Config;
using DarkUI.Controls;
using DarkUI.Docking;
using DarkUI.Forms;
using DarkUI.Renderers;
using DarkUI.Win32;

Using DarkUI controls

Once the DarkUI library is referenced your toolbox should have a section called 'DarkUI Components'. Within this section you'll find all of the controls and components the library offers.

Toolbox

If you don't see this section you might need to select them manually. To do this right-click anywhere within the Tools window and select 'Choose Items...'

Choose items

On the 'Choose Toolbox Items' form click the 'Browse...' button.

Browse

This should add all of the DarkUI components to the list view. Accept these changes to make them show up in the toolbox.

Components

As with any WinForms control library just drag these on to a form or user control and you'll be able to use the visual designer to modify the look and feel of your application.

Creating a DarkForm

DarkForm inherits from Form so can be a drop-in replacement for any references you have to this within your project.

If you modify the blank Form1 class created with a fresh WinForms project you can instantly get started with a dark-themed form.

public partial class Form1 : DarkForm
{
    public Form1()
    {
        InitializeComponent();
    }
}

You should immediately see your changes in the designer.

New DarkForm

Clone this wiki locally