Building an OSD Front End using C#: Part 2 – Initial Form Configuration

Now that we have our development environment sorted and our basic project created we need to lay out the basic framework for our form.  Since we’re using the MahApps.Metro resources we’ll need to change a few things to get everything looking right.

  1. Open the MainWindow.Xaml file from the right hand menu and update the <Window tag to be <Controls:MetroWindow
  2. Now we need to make some changes to the MetroWindow tag, see the following code block and compare to your project. This will add in the namespaces we’ll be using as well as adding in some info about the overall form design.
<Controls:MetroWindow x:Class="UMN_OSDFrontEnd.MainWindow"
        Title="UMN OSD FrontEnd" Height="500" Width="1000" ResizeMode="NoResize">
  1. Open the MainWindow.Xaml.cs file and change the MainWindow class to be MainWindow : MetroWindow
using MahApps.Metro.Controls;

namespace UMN_OSDFrontEnd {
    public partial class MainWindow : MetroWindow {

We should now be able to use F5 to build the application and have a basic Xaml form without any info on it.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.