Basic WPF knowledge

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.