To get started, make sure you have Visual Studio 2005 and these extensions.
Download details: The Visual Studio 2005 extensions for.NET Framework 3.0 (WCF & WPF), November 2006 CTP
Download details: Visual Studio 2005 extensions for .NET Framework 3.0 (Windows Workflow Foundation)
First, I created a new project of type Windows Application under .NET Framework 3.0 category. I named it "HelloWPF".
I then designed the form. The Visual Studio's WPF designer is seperated into 2 panes : one for the visual designer and the other for editing raw XAML code. You can click on the "swap" button to swap the XAML pane and visual designer pane too. However, this CTP version of designer is hard to use and is not very impressive.
public partial class Window1 : System.Windows.Window
{
public Window1()
{
InitializeComponent();
btnSayHello.Click +=
new RoutedEventHandler(btnSayHello_Click);
}
void btnSayHello_Click(object sender,
RoutedEventArgs e)
{
txtMessage.Text = "WPF : สวัสดี ว่าไง";
}
}
I could finally press the F5 button and this is the result.