WPF For WinForms (and MFC) Developers (Part 5)

January 29, 2011

Previous posts in this series: Part 1: Why WPF? Part 2: What is XAML? Part 3: XAML in practice Part 4: Dependency Properties In the previous part we discussed dependency properties. We saw that dependency properties support change notifications, memory conservation, multiple property providers and more. What are Attached Properties? First and foremost, attached properties are dependency properties, meaning they support the same of features as regular dependency properties. The difference is, that attached properties are defined by...
tags: , , ,
no comments

WPF For WinForms (and MFC) Developers, Part 4

January 19, 2011

Previous posts in this series: Part 1: Why WPF? Part 2: What is XAML? Part 3: XAML in practice In previous posts, I introduced WPF and XAML. XAML is a declarative, neutral language that fundamentally allows creating objects and setting properties. But what about properties? How are they implemented in WPF? Is it the customary private field access (plus maybe validation), or maybe it’s something else? And if it’s something else, then what is it and why? Properties Perhaps it helps to cover some basics...
2 comments

WPF for WinForms (and MFC) Developers Part 3

January 16, 2011

In the previous part we learned the rules of XAML. So now we can create loose XAML files and view them in a container such as Internet Explorer. Note that there is nothing “webby” about those XAML files and they will not be rendered by IE if WPF is not installed. Bringing it to the Real World Now let’s use Visual Studio to create a new WPF application. Open Visual Studio, Select File->New Project, select C# (or VB if you’re that kind of guy) and then select “WPF Application” in the right pane. Give it a name,...
tags: , , , ,
no comments

WPF For WinForms (and MFC) Developers Part 2

January 14, 2011

In part 1 I discussed why should something like WPF exists. In this part I’ll talk about that thing called XAML. When people first hear there is a new language to learn to use WPF, they instinctively get defensive. Another language? What’s wrong with C#? If it’s good enough for WinForms and a bunch of other technologies, why do we need another language to learn? Isn’t learning WPF bad enough? The “good” news is that a WPF application can be written entirely in C# and use no XAML at all. Anything that can be done in XAML can...
tags: , , ,
3 comments

WPF For WinForms (and MFC) Developers, Part 1

January 11, 2011

WPF has been around for more than 4 years now (since the release of Windows Vista), but only in the last couple of years there is increased move from Windows Forms to WPF. However, the transition is anything but easy. This is not just because WPF is relatively new, or because people are people, and as such don’t like change for the sake of change. I mean, WinForms is ok, isn’t it? MFC may be old, but it works, doesn’t it? The term User Interface (UI) has served us for years. In recent years, this just isn’t enough....
3 comments