[WPF learning materials] WPF Introduction

Source: Internet
Author: User

Windows Presentation Foundation (WPF) is the next-generation display system used to generate a Windows client application that can bring users an amazing visual experience.Program. Using WPF, you can create a wide range of independent applications and applications hosted by browsers.At its core, WPF is a vector-based rendering engine that is independent of resolution, designed to take advantage of modern graphics hardware. WPF extends this core through a set of application development features, including eXtensible Application Markup Language (XAML) controls, data binding, layout, 2D and 3D graphics, animations, styles, templates, documents, media, text, and layout.

For an ASP. NET developer, the WPF programming method should be very familiar; WPF makes the interface and CoreCodeThis is similar to ASP. NET programming. In ASP. NET, HTML is used to present the user experience, while in WPF, XAML is used for rendering. Both HTML and XAML are extensions of the Extended Markup Language XML. To support some more powerful WPF functions and simplify programming experience, WPF includes more programming structures that enhance attributes and events:Dependency attributes and routing events.

Applications

In WPF, applications can be divided into independent applications and browser applications. Similar to windowform, independent applications can use MessageBox and other methods. browser applications run programs using Browser IE, called XAML browser applications (xbap ).

WPF applications can be hosted in Internet Explorer 7 or Internet Explorer 8. WPF provides the following two options as an alternative navigation Host:

    • Frame is used to hold isolated islands of navigation content in a page or window.

    • Navigationwindow, used to hold the navigation content in the entire window.

WPF controls

The built-in WPF controls are listed here.

    • Buttons: button and repeatbutton.

    • Dialog Box: openfiledialog, printdialog, and savefiledialog.

    • Digital Ink: inkcanvas and inkpresenter.

    • Documentation: documentviewer, flowdocumentpageviewer, flowdocumentreader, flowdocumentscrollviewer, and stickynotecontrol.

    • Input: Textbox, RichTextBox, and passwordbox.

    • Layout: border, border, canvas, dockpanel, expander, grid, gridview, gridsplitter, groupbox, panel, resizegrip, separator, scrollbar, scrollviewer, stackpanel, thumb, viewbox, virtualizingstackpanel, window and wrappanel.

    • Media: image, mediaelement, and soundplayeraction.

    • Menu: contextmenu, menu, and toolbar.

    • Navigation: frame, hyperlink, page, navigationwindow, and tabcontrol.

    • Select: checkbox, ComboBox, ListBox, Treeview, radiobutton, and slider.

    • User information: accesstext, label, popup, progressbar, statusbar, textblock, and tooltip.

The layout system makes public to the Child control through the Basic WPF class. For general la s, such as grid, stack, and dock, WPF includes several layout controls:

    • Canvas: A child widget provides its own layout.

    • Dockpanel: The child widget is aligned with the edge of the Panel.

    • Grid: Place child controls by row and column.

    • Stackpanel: vertical or horizontal stack of child controls.

    • Virtualizingstackpanel: subcontrols are virtualized and arranged in a row horizontally or vertically.

    • Wrappanel: child controls are placed from left to right. If the number of controls in the current row exceeds the number of controls allowed in the space, change to the next row.

Layout is very important for an application, which is the same as HTML Rendering in ASP. NET. Based on the functions of some controls provided in the layout, you can select a proper control to get twice the result with half the effort!

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.