29 May 2007

Hello World Orcas

Welcome everyone, today I decided to install Orcas in my job computer (xp) and this afternoon in my own computer(vista). Well with xp any matter I installed Visual c# express Orcas and compiled without problem. But this afternoon with Vista, ouch.

If you have any problem post me a comment, to tell you how to solve it. And now... Hello World Orcas:

1.- Create a new WPF application















1.1- Go to Project : HelloWorld properties and change the next:












2.- Add a button on the window


















3.- Let's create the event (I supposed they will put a design mode early), to do that, go to the window.xaml.cs (yeah we will have to get customed):



















4.- And now add the following code:

public partial class Window1 : Window
{
public Window1()
{
InitializeComponent();
button1.Click += new RoutedEventHandler(button1_Click);
}
void button1_Click(object sender, RoutedEventArgs e)
{
MessageBox.Show("Hello World");
}
}


Run and you will have your first VISTA WPF .net 3.5 C# first app, Congratulations :)

3 comments:

Max said...

Don't check any blog every day. But yours...

Lex Li said...

I did not install Orcas directly. Instead I tried the Virtual PC image. At this moment, I do not think Orcas is much better than VS 2005 because the IDE is nearly the same. Wish the guys could introduce more IDE updates in later builds.

Juanpa said...

I think they are making a good job, now MS has to add the events matter, and I'm going to investigate how to "override" controls