First Window
“A real Windows app. Buttons. Text. Yours. Running on your desktop.”
WPF lets you build real Windows desktop apps — actual windows with buttons, text boxes, and forms that run on your computer. It’s used in professional software every day. You’re about to build one.
A real Windows desktop app with a text box, a button, and a label. You type your name, click the button, and the label updates with a personalised greeting.
This is not a console window. This is a proper Windows application running on your desktop — with a title bar, minimize button, and everything.
Watch the full lesson walkthrough.
You need Visual Studio with the right workload.
If you’ve already done the C# Console lessons you have Visual Studio installed. Go to Tools → Get Tools and Features → make sure “.NET desktop development” is ticked.
Copy this. Paste it into your AI. Hit Enter.
WPF is slightly different to Console — follow these steps carefully.
WPF has two files — the most common mistake is putting code in the wrong one. Check that first. Then:
Change the window colour.
Open MainWindow.xaml. Find the Background property. Change it to #1E3A5F — a deep navy blue.