Blogs

The One With

Build for Beautiful with DXv2: Metro Inspired WinForms Apps

     

Designing beautiful apps is not an easy task. But with DXv2, building beautiful Metro inspired applications is easier than ever. Let me show you how:

WinForms Metro App - Tile Control

WinForms Metro App - Grid Control

 

Prepare the project

Create a new WinForms Project and add a DevExpress Form to it. This will be the main or “home” screen for the app.

WinForms Metro App - Add New Form

We’ll need to bring in two assemblies:

WinForms Metro App - Add Reference

1: DevExpress.Metro.Navigation: This assembly contains sample code for building basic Metro inspired layouts and navigation. You will also find additional goodies like Transitions, which you can use in other areas of your app.

2: MetropolisDark4Touch: This is a new Metropolis Dark skin that has been optimized for touch. We’ll register it like so:

static void Main() {
    DevExpress.Skins.SkinManager.Default.RegisterAssembly(
        typeof(DevExpress.UserSkins.MetropolisDark).Assembly
    );

    DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle(
        "Metropolis Dark 4 Touch"
    );

    DevExpress.Skins.SkinManager.EnableFormSkins();

    Application.EnableVisualStyles();
    Application.SetCompatibleTextRenderingDefault(false);
    Application.Run(new DXv2());
}
 

Add your business screens

After we prepare the app for Metro, we can start designing our screens. For the home screen, we’ll use the new TileControl.

WinForms Metro App Toolbox - Tile Control

WinForms Metro App - Home Screen

Note: You can watch the Getting Started with Tile Control Video here.

To build a new app screen we simply create a new DevExpress Form and customize it to our needs. For example, a simple customers list displayed in a Grid at design time:

WinForms Metro App - Grid Control Screen

To switch to this screen in our app, simply invoke it from the click event:

private void CustomersItem_Click(object sender, TileItemEventArgs e) {
    this.GoTo<Customers>();
}

And that’s pretty much it Smile

Download the sample app and skin here. (Build: 11.2.7+)

Cheers

Azret

EDIT: We have integrated this and many other features of building Windows 8 UI into a Document ManagerDocument Manager ships with DXperience along with a brand new Metropolis Dark and Metropolis Light application skins.
 

 

Published Dec 29 2011, 03:22 PM by Azret Botash (DevExpress)
Bookmark and Share

Comments

 

Glen Harvy said:

Thanks for this post. I had been a little bewildered as to why I would want to use a Tile Control however it is now obviously a replacement/alternative for the Tab Control. The possibilities are also starting to sway me to it's usage.

December 29, 2011 11:17 PM
 

Sorin Sandu said:

Great

What about a post with Metro Inspired WPF Apps ?

RealtorWorld demo it's very complicated.

Something simple please.

December 30, 2011 1:19 AM
More from DevExpress
Live Chat
Have a pre-sales question?
Need assistance with your evaluation?
We are here to help.
Chat is one of the many ways you can contact members of the DevExpress Team. We are available Monday-Friday between 7:30am and 4:30pm Pacific Time.
If you need additional product information, require pre-sales assistance, or want help with your order, write to us at info@devexpress.com or call us at
+1 (818) 844-3383.