WPF first acquaintance(WPF Lecture Series-1)
MicroSoft has made four major diamond in. net3.x: WPF, WCF, WF, and WCS. It can be said that these four diamond Kong jobs have their own unique abilities. On the one hand, they provide us with excellent performance.ProgramMembers have brought unprecedented expectations: Microsoft has given our developers a powerful edge. On the other hand, it has also brought unprecedented confusions. There are too many things to learn .. In the net3.x series, WCF, WF, and WCS often like to fight side by side, while WPF is so cool that it shows its own brilliant feathers on the Windows client, what's too much is that the popular RIA is also a plug-in, giving birth to a Silverlight doll, but don't look at the newborn boy Silverlight, Microsoft has made enough investment on it, at the age of 1, he has dared to negotiate with flash. At the age of 2, he will be a new favorite of our Microsoft technology enthusiasts. This article focuses on WPF-Windows Presentation Foundation.
MicroSoft Windows Forms in. net2.0 has been well developed. It can be said that it is the best choice for Windows Client development in the past one to two years, but Microsoft no longer continues to develop it. WPF is the future of Microsoft Windows Client development, you should know your choice.
RecognizeTo understand a new thing, we need to understand its nature. a wpf diagram on msdn is simple and clear (here, please do not criticize me for copying msdn. msdn is an important reference for me ):
In this figure, the red part is the proprietary part of WPF technology, and is the core of the entire WPF. It can be seen that WPF is built on Microsoft.. NET Framework (. net2.0), the core components of the prentationframework (that is, the most direct part of our programming) and the prentationcore (WPF programming model interpreter) are fully written using managed code, to make full use of the hardware performance to improve the graphic display, all the underlying display of WPF is completed through the DirectX engine, and commands are performed using milcore (unmanaged component) and DirectX. It seems that we can give WPF a definition like this: WPF is a completely new user presentation infrastructure that makes full use of computer hardware for graphic acceleration and is built on the. NET Framework. Compared with traditional programming models such as GDI +, the WPF framework seems to give programmers a way to get rid of window32. For programmers, we will face the use of the Class Libraries provided by prentationframework and prensentioncore.
FromSince the publication of Petzold's WPF masterpiece, application = code + markup has become a classic topic for people to understand WPF applications, this reminds us of the features of the C/S development tool Delphi, which consists of form files andCodeIn fact, it is not surprising that Delphi and C # are deeply rooted in the design of a designer, and it is inevitable to take the same path, however, what's more about WPF is that the markup here is a file called Xmal (Extensible Markup Language). The reason for this is that the structure of XAML is as clear as that of XML, but it is simpler than XML and has a dedicated compiler and runtime for processing. Each element in the XAML and. net objects correspond one to one, which is the basis for parsing and compiling the XAML file. In this case, we can understand that the WPF program can be designed and used completely without the XAML. the corresponding code of the net class library can develop available programs, but we usually do not do this. One of the highlights of WPF development is that it is easy to separate the business logic and process logic such as code from the interface design, in this way, our UI designers can easily participate. Isn't that exactly what we need?
MicroSoftware has always been a master of development tool design and development.. NET applications, an excellent development environment such as Visual Studio 2008, may be a good news for all Microsoft technology enthusiasts. Open the dialog box for Visual Studio to create a project, we found that the development environment has prepared common templates for WPF development, as shown in:
Through the template, we obviously find that using WPF we can create the following types of programs:
1. Traditional Windows programs like Windows form
2. xbap (XAML browser application) is carried by the browser. This is a brand new application, but the client must be installed. net Framework 3. X framework, the most characteristic of which is that we can develop xbap like a Windows client program, but I guess the official version of silverlight2.0 will be released, and the scope of this application will be further reduced.
3. User Controls and custom control libraries.
4. Class Library (non-executable Assembly containing reusable classes ).
LowerI will discussDevelopment and deployment of WPF applications(Suggestions and commentsEmail:NineFlowers@163.com)