Visual
Visual
It is actually the entry point of the WPF combination system. Visual
It is the connection point between managed APIs and unmanaged milcore subsystems.
Visual Objects support the following features:
- Output display: displays the persistent serialized drawing content of the visual object.
- Conversion: converts a visual object.
- Editing: supports the editing area for visual objects.
- Hit test: determines whether the specified coordinate (point) or ry is included in the boundary of the visual object.
- Border box calculation: determines the border of the visual object. Uielement
Uielement
Define core subsystems, including layout, input, and event.
Layout
Layout is a core concept in WPF. In many systems, there may be a set of fixed layout models (HTML supports three layout models: stream, absolute, and table), or there may be no layout model (USER32 actually only supports absolute positioning ). WPF assumes that developers and designers want to have a flexible and scalable layout model, which may be driven by attribute values rather than imperative logic. In uielement
Level, will introduce the basic layout agreement-with Measure
And arrange
The two-phase model of the processing process.
Input
Touch \ mouse \ stylus \ keyboard
The input is sent as a signal on the driver of the kernel-mode device and routed to the correct process and thread through a complex process involving the Windows Kernel and USER32. After the USER32 message corresponding to the input is routed to WPF, it is converted to the original input message of WPF and sent to the scheduler. WPF allows you to convert original input events to multiple actual events, allowing you to implement a function similar to "mouseenter" at a lower system level while ensuring that the input events are passed in place.
Event
Preview tunnel routing event vs bubble event
If an event traverses the tree from the target to the root, it is called "Bubbling". If it traverses down from the root to the target, it is called a "Tunnel ". Enter the preview event tunnel so that any element in the tree has the opportunity to filter events or take actions on events. Then, the general (non-Preview) event will bubble up from the target to the root.
Inheritance hierarchy
System. Object
System. Windows. Threading. dispatcherobject
System. Windows. dependencyobject
System. Windows. Media. Visual
System. Windows. uielement
System. Windows. frameworkelement
Frameworkelement
A)
Application Layout
Frameworkelement
The main strategy introduced is application layout. Frameworkelement
Based on uielement
Built on the basic layout introduced, and added the concept of "slots" for layout creators to conveniently have a set of consistent and Attribute-driven layout semantics. Horizontalalignment, verticalignment, minwidth
And margin
Such
All derived components have consistent behavior in the layout container.
B)
Animation
C)
Data Binding Template
D)
Style
Control
A)
Common attributes
Control
Provides a set of common attributes, such as foreground, background, and padding.
Template creators can use these common attributes to customize the display of controls. Controls provide a data model and an interactive model. The interactive model defines a set of commands (such as window "close") and binding to the input pen potential (such as clicking the Red Cross in the window ). The data model provides a set of attributes for customizing the interaction model or custom display (determined by the template ).
B)
Model
The data model (attribute), interactive model (command and event), and display model (Template) are divided so that you can completely customize the appearance and behavior of the control. The most common control data model is the content model.