How to create, design, execute, and deploy a WPF Application Program 1. What is WPF?
1. Integration with the job system and vector-based UI Combination Engine
2. Unified UI interface, file and media programming
3. Declarative Programming
4. easy deployment
For more information, see Baidu encyclopedia.
Http://baike.baidu.com/view/292311.htm
2. WPF applications can be executed in two ways
1. standalone (stand-alone, like winform)
2. xbap (XAML browser applications)
3. Create a New WPF application. Enable Visual Studio 2010 first. You can also set this feature on our host to be set. However, the WPF web application is removed from vs2010.
We can also press the shortcut key Ctrl + Shift + n
Create a new WPF application. After opening the application, we can see the following figure:
Note: In <WINDOW> </WINDOW>, there is also a webpage format in <page> </Page>.
Let's add two buttons to him.
Let's give button1 a click event. Let's look at the backgroundCode. Right-click to view the code or press the shortcut key F7
We provide the content of button1 with a current time; toshorttimestring () is a short time format.
Press F5 to run the result:
When we click the button below