#194 – Hello WPF World, Love Blend

Let’s create a simple application using Blend.  We’ll just have a single button in a window, which will display a message when you click it.

Use Blend to create a new WPF Application project.

Find a Button on the Assets tab.

Drag it onto your main window.

Left-click to select the button.  Change its Content property to “Hello”.

The button’s content will update in the designer.

Left-click to select the button.  Click on the Events icon in the Properties panel.

Dbl-click in the text area to the right of the Click event.  A Button_Click event handler will be created and you’ll be taken to the code editor.

Erase the “TODO” comment line and add the following line:

    MessageBox.Show("I'm a Blend convert!", "About Me");

Press Ctrl-F5 to run the project.  You’ll see your main window.

Click on the Hello button to see your message.

About Sean
Software developer in the Twin Cities area, passionate about .NET technologies. Equally passionate about my own personal projects related to family history and preservation of family stories and photos.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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

Follow

Get every new post delivered to your Inbox.

Join 131 other followers