Summary:
WPF is used by Microsoft to develop rich clients.ProgramA new generation of user interface framework. Included in. net3.0 and later versions.
The WPF framework integrates application interfaces, 2D images, 3D images, documents, multimedia, and other elements. It uses the latest graphics card hardware acceleration vector rendering engine, making the user interface faster, better scalability and
Resolution independence.
The following figure shows the latest features of WPF:
Separation of behavior and display:
WPF completely separates the display of the user interface from its behavior control. The interface is usually generated by the Extensible Application Markup Language (XAML), and the behavior is implemented by a hosted language, such as C # and VB. They are associated with each other through data binding, events, and commands. The separation of behavior and display has the following advantages:
- Reduces the coupling between interfaces and Behaviors
- Designers and developers can work in their respective Modes
- The interface design tool only works on a document similar to XML, instead of being convertedCode
Widget assembly:
WPF controls are easily assembled. You can use other controls to define the content of any space. Although it sounds a little scary for designers, it will have very powerful functions if appropriate. You can place an image in the button to create a graphic button, or you can place a video list in the drop-down box to select a playback file.
<Button> <stackpanel orientation ="Horizontal"> <Image Source ="Speaker.png"Stretch ="Uniform"/> <Textblock text ="Play Sound"/> </Stackpanel> </button>
Highly customizable:
Since the WPF interface and control are completely separated, it is easy to change the appearance of a control. The appearance of style allows you to control the control skin like CSS in HTML, and the template can completely subvert the overall display of the control.
The following example shows the default and custom buttons in WPF.
Independent Resolution:
All the controls in WPF are measured in logical units rather than pixels. A logical unit is equal to 1/96 feet. Even if you increase the resolution of the monitor, the user interface remains as it is and remains clear. This is because WPF creates a vector-Based Graphics Rendering Engine, so it is easy to create scalable user interfaces.