Reputation: 10681
At the University we teach .NET (both VB and C#) using Windows Forms. We want to introduce the concept of Windows Presentation Foundation (WPF) to our advanced course. Which fundamentals of WPF does students need to learn in order to get the basic knowledge of WPF?
The idea is for student to use WPF in at least one of six assignments, and to learn all of these WPF Fundamentals seems a bit daunting. Which three-four basics is considered mandatory?
Thanx for your time!
Upvotes: 6
Views: 2420
Reputation: 8763
Here is the list. I prepared for my junior programmer.
1) XAML Basics & Basic controls such as TextBox, Buttons etc.,
2) VisualTree and LogicalTree
3) Bubbling and Tunneling
4) DependencyProperty
5) AttachedProperty
6) DataTemplate
7) ControlTemplate
8) Style
9) DataBinding
Triggers:
10) EventTriggers
11) DataTriggers
MVVM Basics & Commands:
12) DelegateCommand
13) RelayCommand
14) ApplicationCommands
15) RoutedEvent
16) RoutedCommand
Transformations:
17) RenderTransform
18) LayoutTransform
Resources:
19) BinaryResource
20) LogicalResource
21) StaticResource
22) DynamicResource
23) RelativeResource
Panles and Basic Controls:
24) Layouts and Panels
25) UserControl
26) ContentControl
27) Some Controls like Grid, TreeView and Charts
Interfaces and Collections:
28) IValueConverter
29) INotifyPropertyChanged
30) ObservableCollection
31) CollectionViewSource
HTH
Upvotes: 10
Reputation: 5123
Dependency Properties, Routed Events and layout model are absolutely necessary in my opinion. Data Binding & MVVM come next.
I'm not a WPF guru, but i think that technically, WPF is much more complex, that Windows Forms, and if students are common with later, it will be hard to code using a "WPF-way" ( especially, if there is no html/xml background ). I doubt, that it is possible to write robust code using WPF without knowing some major aspects of it. WPF is really a bad choice for quick or simple UI's. It needs a considerable amount of learning time to dive in.
Upvotes: 2
Reputation: 49649
If you think about how to didactically structure your course, you should consider Petzold's book. The way he structures his chapters works perfectly well for live courses. It is very fine tuned didactically and we made some good experience structuring a course around this book. We have also made the experience that it works especially well for people with a Windows Forms background. It starts out with code only (c#) and only later introduces XAML. This helps a great deal to grasp the concepts of the framework.
Upvotes: 3
Reputation: 25287
Although this is quite subjective, I think a good four would be (from that link):
Apart from these, Dependency Properties are Important as well as at least understanding how XAML works. There is no real "only option" when it comes to WPF. It's a brand new way of doing things if you have worked with models such as WinForms. I would try to learn as much as possible.
Upvotes: 1
Reputation: 49435
I found Charles Petzhold's book "Applications = Code + Markup" to be extremely helpful when I started out with WPF. The first half of the book is entirely C# code, teaching the basic concepts of WPF (dependency properties, eventing, etc.) with no XAML whatsoever. The second half of the book introduces the concept of XAML and how it relates to everything you learned in the first half of the book. If I were teaching a class on WPF, I would definitely lay things out in a similar way -- teach the concepts in code first, then introduce XAML.
Upvotes: 1
Reputation: 2237
I really don't believe that three or four topics is enough. But talking about highest priorities, I'd say
Upvotes: 6
Reputation: 245479
They're all called fundamentals for a reason. You should have at least a basic understanding of all of them if you're planning on building any sort of successful WPF application.
If I had to single some things out so that your class could at least get started with building something, I would probably say:
XAML and Data Binding are both musts. Dependency Properties are a close second. Input/Commands/Routed Events all would be included as well.
Upvotes: 2