A talk about WPF--a brief introduction

Source: Internet
Author: User
Tags sharpdevelop

I've been working on the development of WPF for more than two years. It's not an expert level, though. However, there is some understanding of WPF applications. His flexibility is not under WinForm. The advent of WPF has sparked a heated debate. What he is doing is making a lot of people feel confused. Because at that time it can be said that only Winow 7 can be the perfect engagement with WPF. Unfortunately, when he was out of business, XP accounted for most of the market. So the birth of WPF is very large, but unfortunately after the lack of strength, gradually diluted his light. There has been a great controversy over the internet on the death of WPF. But that didn't keep him quiet, and the promotion of Window 8 and window 10 over the years was a sign of getting him up. The extent to which WPF will evolve in the future. I do not dare to speculate. More just hope he can go a little farther.

If WPF does not have the advantages of WinForm, then he will not be able to live until now, let alone possibly rise. So I want to open a series to talk about the two years of the WPF tour. Hope to bring some help to those students who are learning about WPF or are going to learn. Because of the author's own learning style has a little unorthodox reasons, so this series of articles can only be defined as a talk.

There was a colleague who was just working on WPF asking the author what is the difference between static resources and dynamic resources. The author silly a few seconds to ask what is static resources, what is dynamic resources. The result of this conversation is conceivable--very embarrassing. Why do I not know static resources and dynamic resources? In fact, I have not read the relevant WPF books. So how does the writer learn about WPF? A word--see open source project source code to study. Originally I wanted to name this series "WPF Open Source project". Later think of a bit arrogant, at the same time I do not know this series to what kind of knowledge route to explain. So the name "WPF talk" shows a dull point, but also let the author free to brag.

Previous technologies used to develop commercial software were WinForm (C #), MFC (c + +), Swing (JAVA), Delphi. Right now. NET also has a WPF. Then there is the WinForm, why. NET is also coming up with a WPF. I have ever thought of such a problem. Unfortunately, I am a lazy person, the back is not carefully to find the reason. The agile of WPF is one of the advantages that I deeply like. Compared with WinForm, I only know that their graphics engine looks different. This is still seen in some books. WinForm is based on user32/gdi/gdi+, and WPF is based on the DirectX engine. Do not need to say more to understand--directx often in the development of the game when the time to hear. So WPF can do a lot of good animation effects. This is what WinForm cannot do. Oh! No. It should be said to be difficult to do. But I still do not have much to apply animation effect. Mainly the author engaged in the catering industry. The computer in the restaurant is not to be detained. The 516 Memory XP system is a normal. If you use animations, you're destined to pay for bugs and running performance. This illustrates the problem that WPF needs to have a certain configuration environment. In terms of the. NET Framework, the. NET 4.0来 is a bit better. Because this Xp,window 7,window 8 or Window 10 can be shared.

The reason why I can quickly get started with WPF. Here is a deep appreciation for those who open up their projects. The foreign developers have done a good job. WPF has a lot of knowledge points at home is not able to Baidu, so want to learn WPF or to do a VPN or find a way to jumps over the past.

SharpDevelop

SharpDevelop is a development tool developed in C #. This is the author's first contact with the WPF project. The author of the source code has only seen the part. The author of the year was engaged in Java development. Interesting for the Java OSGi idea. Also tried to find out if there was. NET great God wrote some similar frameworks. But unfortunately too little, some are also semi-finished products are not real OSGi. But. NET has a mind of its own--plugin thought. This is the reason why I look at his source code. Although he did not have the idea of OSGi, but the author of his plug-in implementation is still a certain interest. So interested readers can try to take a look. All right. It's a little far away. SharpDevelop He can be said to be a combination of WPF and WinForm. Part of him is the WPF implementation. Some, however, use WinForm. Of course the readers will think so. Not afraid of problems? The problem is not too big. But I still suggest not to use such a child. Ghosts know what they will be like in the future. Of course, if it's just one project, you can do it for convenience. Anyway, the project is finished and goodbye. No maintenance. SharpDevelop a Little big, want to eat through his words, need a certain amount of time and energy. But he really is one of the best open source projects to learn PC-side development.

SharpDevelop: Https://github.com/2594636985/SharpDevelop.

Xceed.Wpf.Toolkit

Xceed.Wpf.Toolkit is a framework. He customizes some of the common components. such as loading the prompt box. A complex list. Xceed.Wpf.Toolkit only the expression layer to use the knowledge, there is no business logic, so learning is still relatively easy to accommodate. Not like the sharpdevelop above. Also to combine WinForm. Most of his source code has been read by the author. So what are we going to learn from him? Of course, learn how he implements user-definable components. Now he has updated the new version. But a lot of the source code does not change. Naming habits or that kind of son so that I do not like. But it has to be said that he is the best mentor for customizing components into WPF users. Beginner WPF Learners can look at this open source project.

xceed.wpf.toolkit:http://wpftoolkit.codeplex.com/

Modern UI for WPF

Having experienced the two projects above, I encountered the best comrade in WPF Life--modern UI for WPF Open Source project (also known as MUI). As mentioned above, I have been looking at the plugin idea. The modern UI for WPF is definitely good at both the implementation of WPF and the editorial mindset. How did you learn modern UI for WPF and studied his source code. Then you can easily change his framework to implement the architecture you need. It can be said that Xceed.Wpf.Toolkit is the depth of Wpf-oriented. and modern UI for WPF can be said to be breadth. You can choose Xceed.Wpf.Toolkit to learn component knowledge. If you want to learn how to develop WPF, modern UI for WPF is the perfect candidate. You can see how to switch the interface from the source. How to implement the interaction between interfaces. And you can also see how to compose resources.

Modern UI for Wpf:https://github.com/firstfloorsoftware/mui

Materialdesigninxamltoolkit

When I met the Materialdesigninxamltoolkit open source project, I realized that WPF could have done so well. If Materialdesigninxamltoolkit is a good young person, then modern UI for WPF is undoubtedly an old man who has lived through the ages. Materialdesigninxamltoolkit has done a lot of work on animation and artwork. Unfortunately the author is unable to digest. Damn the catering industry. Each twist is animated enough to give you a good night's sleep. The drawback is that the author uses 4.5.2 more than the. NET framework syntax to write. So you may have to manually change it back. becomes 4.5 or 4.0. At least I did it this way. With the following code habits let the author sigh a breath. There's no rule here.

Materialdesigninxamltoolkit:https://github.com/butchersboy/materialdesigninxamltoolkit

Mahapps.metro

and Materialdesigninxamltoolkit, unfortunately in the author's opinion he did not materialdesigninxamltoolkit to the effect, and no modern UI for WPF in general outstanding performance. It can be said that Mahapps.metro is more stable for learning WPF. There are not too many bright spots. Maybe I have the experience of the above three open source projects. To see the Mahapps.metro show a bit of knowledge fatigue. So I generally just think of him as a little lover to see. If the above three open source projects do not find the author need time, will go to find Mahapps.metro.

Mahapps.metro:https://github.com/mahapps/mahapps.metro

I have seen a very WPF open source application project. And the last to stay is the few. In the back of the development process, I also rely on the open source projects here to solve a lot of development problems. In the development process it is obvious that the feelings and WinForm have fundamentally different. The biggest manifestation of WPF is the introduction of the MVVM pattern development. There is also a lot of open-source MVVM frameworks for this. One of the most famous is prism, Mvvmlight and so on. Unfortunately, the author has not used it. Not the author does not want to use. Instead, the flexibility of WPF is reduced by a certain procedure. If you want to save, I will choose Caliburn.micro Open Source project. For Caliburn.micro applications There is a small open source project. Readers can look at--gemini.

The author's way of learning is also very simple to see the source code. It can be said that the author of the WPF tour is to eat the source of travel. I do not know whether everyone is the same as the author. The following articles do not appear in the professional terminology also please do not care too much. I really haven't read many books. Almost full combat.

A talk about WPF--a brief introduction

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.