Following are some of my observations got from the book:
Chapter 1&2
- XAML is just a way to use .NET APIs. WPF and XAML can be used independently from each other.
- XAML specification defines rules that map .NET namespaces, types, properties, and events into XML namespaces, elements, and attributes.
- Markup extensions are just classes with default constructors.
- An object element can have three types of children: a value for a content property, collection items, or a value that can be type-converted to its parent.
Chapter 3 Important new Concepts in WPF
Logic Tree
The logical tree concept is straightforward, but why should you care about it? Because just about every aspect of WPF (properties, events, resources, and soon) has behavior tied to the logical tree. For example, property values are sometimes propagated down the tree to child elements automatically, and raised events can travel up or down the tree. Both of these behaviors are discussed later in this chapter.
Visual Tree
A similar concept to the logical tree is the visual tree. A visual tree is basically an expansion of a logical tree, in which nodes are broken down into their core visual components. Rather than leaving each element as a “black box,” a visual tree exposes the visual implementation details. For example, although a ListBox is logically a single control, its default visual representation is composed of more primitive WPF elements: a Border, two ScrollBars, and more.
Dependency Properties
A dependency property depends on multiple providers for determining its value at any
point in time. These providers could be an animation continuously changing its value, a
parent element whose property value trickles down to its children, and so on. Arguably
the biggest feature of a dependency property is its built-in ability to provide change notification.
Change Notification (Property Trigger)
Property Value Inheritance
Multiple Providers
Attached Properties
Routed Events (routing Strategies:tunneling, bubbling, Direct)
Attached Events
Commands: a more abstract and loosely-coupled version of events.
