Most of the WPF examples out there start with too much Xaml - seems like it's just going to get in the way for now.
Norbert Eder's blog had the meat of this - I just stripped it down even more.
public class App : Application
static void Main(string args)
Application app = new Application();
public class MainWindow : Window
Button button1 = new Button();
button1.Content = "Bye";
button1.Click += new RoutedEventHandler(button1_Click);
this.Content = button1;
this.Title = "Hello world";
void button1_Click(object sender, RoutedEventArgs e)
The project only needs a couple references – PresentationCore, PresentationFramework, System, and WindowsBase: