|
Introduction to Windows Presentation Foundation
Overview
The Windows Presentation Foundation is Microsofts next generation UI framework to create applications with a rich user experience. It is part of the .NET framework 3.0 and higher.
WPF combines application UIs, 2D graphics, 3D graphics, documents and multimedia into one single framework. Its vector based rendering engine uses hardware acceleration of modern graphic cards. This makes the UI faster, scalable and resolution independent.
The followinig illustration gives you an overview of the main new features of WPF
Separation of Appearance and Behavior
WPF separates the appearance of an user interface from its behavior. The appearance is generally specified in the Extensible Application Markup Language (XAML), the behavior is implemented in a managed programming language like C# or Visual Basic. The two parts are tied together by databinding, events and commands. The separation of appearance and behavior brings the following benefits:
- Appearance and behaviour are loosely coupled
- Designers and developers can work on separate models.
- Graphical design tools can work on simple XML documents instead of parsing code.
Rich composition
Controls in WPF are extremely composable. You can define almost any type of controls as content of another. Although these flexibility sounds horrible to designers, its a very powerful feature if you use it appropriate. Put an image into a button to create an image button, or put a list of videos into a combobox to choose a video file.
<Button>
<StackPanel Orientation="Horizontal">
<Image Source="speaker.png" Stretch="Uniform"/>
<TextBlock Text="Play Sound" />
</StackPanel>
</Button>
Highly customizable
Because of the strict separation of appearance and behavior you can easily change the look of a control. The concept of styles let you skin controls almost like CSS in HTML. Templates let you replace the entire appearance of a control.
The following example shows an default WPF button and a customized button.
Resolution independence
All measures in WPF are logical units - not pixels. A logical unit is a 1/96 of an inch. If you increase the resolution of your screen, the user interface stays the same size - if just gets crispier. Since WPF builds on a vector based rendering engine it's incredibly easy to build scaleable user interfaces.
Comments on this article
Show all comments
 |
| IMTIAJ KHAN | |
|
| Commented on 20.August 2010 |
| WONDERFUL TECHNOLOGY
|
|
|
 |
| asdf | |
|
| Commented on 23.August 2010 |
| dasf
|
|
|
 |
| fbi | |
|
| Commented on 23.August 2010 |
COPYRIGHT INFRINGEMENT AT ITS FINEST!!!!!!!!!
MOSER IS GREASY AS HELL
|
|
|
 |
| the law | |
|
| Commented on 23.August 2010 |
| wow you guys are really that impressed by mosers copy and pasting
|
|
|
 |
| Christian Moser | |
|
| Commented on 23.August 2010 |
| Its funny that you guys find my articles so helpful considering I just copy and pasted random shit from other random sites that I found. Its all good though because those google ads are making me cash!!!
|
|
|
 |
| Christian Moser | |
|
| Commented on 23.August 2010 |
| Dont bother deleting them because I wont stop :)
|
|
|
 |
| prabhat | |
|
| Commented on 24.August 2010 |
| Thanks all the WPF Tutrial team.
|
|
|
 |
| sanjeewa | |
|
| Commented on 25.August 2010 |
| WONDERFUL
|
|
|
 |
| Mervinkumar M. | |
|
| Commented on 25.August 2010 |
| Nice Artice very Helpful for me
|
|
|
 |
| Shashidhar K | |
|
| Commented on 25.August 2010 |
| Nice Introduction..
|
|
|
 |
| varun c/o INDIA | |
|
| Commented on 25.August 2010 |
| hai bro,nice information abt WPF and fantastic website design
|
|
|
 |
| varun c/o INDIA | |
|
| Commented on 25.August 2010 |
| hai bro,nice information abt WPF and fantastic website design
|
|
|
 |
| varun c/o INDIA | |
|
| Commented on 25.August 2010 |
| hai bro,nice information abt WPF and fantastic website design
|
|
|
 |
| chii lok | |
|
| Commented on 26.August 2010 |
| Nice intro
|
|
|
 |
| chandru | |
|
| Commented on 27.August 2010 |
| excellent introduction ...... it was like a hero intro in a movie :)
|
|
|
 |
| chandru | |
|
| Commented on 27.August 2010 |
| excellent introduction ...... it was like a hero intro in a movie :)
|
|
|
 |
| Ramesh | |
|
| Commented on 29.August 2010 |
Excellent introduction.... It's really good for beginers
|
|
|
 |
| Amey Odak | |
|
| Commented on 30.August 2010 |
| Thanks for the Wonderful Introduction
|
|
|
 |
| Vincent Murphy | |
|
| Commented on 30.August 2010 |
| Thanks for your time and effort you've put into this. If all people can comment with is "Copyright" blah blah.... then they might consider contributing something more positve with their efforts. Anyway, cheers, keep up the good work.
|
|
|
 |
| Geetha | |
|
| Commented on 31.August 2010 |
| very nice...
|
|
|
 |
| ravi teja | |
|
| Commented on 1.September 2010 |
| very helpful...
|
|
|
 |
| Eyad | |
|
| Commented on 1.September 2010 |
| nice work, keep it up
|
|
|
 |
| Raviprakashr... | |
|
| Commented on 1.September 2010 |
Really good for Bigineers
|
|
|
 |
| Nanak Kumar... | |
|
| Commented on 1.September 2010 |
| It is nice tutorial for beginners....really good
|
|
|
 |
| Nanak Kumar... | |
|
| Commented on 1.September 2010 |
| It is nice tutorial for beginners....really good
|
|
|
|