Download presentation
Presentation is loading. Please wait.
Published byWidyawati Atmadjaja Modified over 6 years ago
1
.NET and .NET Core 8. WPF Hierarchy Pan Wuming 2017
2
WPF Class Hierarchy
3
Unmanaged component The milcore is an unmanaged component
This is to enable tight integration with DirectX
4
DispatcherObject WPF is based on a messaging system implemented by the dispatcher The dispatcher is a basic message dispatching system, with multiple prioritized queues. Examples of messages include raw input notifications (mouse moved), framework functions (layout), or user commands (execute this method). WPF’s threading model was kept in sync with the model of single threaded execution with thread affinity (STA). DispatcherObject is simply an object that’s linked to a dispatcher—in other words, an object that’s bound to the dispatcher’s thread.
8
DependencyObject WPF elements are built on the principle of composition and component reuse. System driven by properties: The property system is truly a "dependency" property system in that it tracks dependencies between property expressions and automatically revalidates property values when dependencies change. Two way binding and change notification Property expression: free of hard code Sparse storage of property values Attached properties: Additional data on child elements
12
In WPF, properties are typically exposed as common language runtime (CLR) properties.
At a basic level, you could interact with these properties directly and never know that they are implemented as a dependency property.
13
Visual Visual is the point of connection between the managed API and the unmanaged milcore The entire tree of visuals and drawing instructions is cached WPF allows each component to paint over the previous component's display.
14
UIElement Core subsystems: Layout, Input, and Events.
Two phase layout model: Measure and Arrange. Events routing: previewing input events tunnel and bubbling input events CommandBindings
15
Example: Mouse Events
18
FrameworkElement Data binding Styles
A lightweight form of data binding Bind a set of properties from a shared definition to one or more instances of an element
20
Control Templating Data model (properties)
Interaction model (commands and events) Display model (templates)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.