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 features of WPF
WPF separates the appearance of an user interface from its behavior. The appearance is generally specified in the XAML (Extensive Application Markup Language), 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.
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 etc..,
<Button> <StackPanel Orientation="Horizontal"> <Image Source="sound.jpg" Stretch="Uniform"/> <TextBlock Text="Play" /> </StackPanel> </Button>
Because of the seperation of appearance and behaviour we can easily change the look of controls, styles for the control is like CSS in HTML.
All measures in WPF are logical units – not pixels. If you increase the resolution of your screen, the user interface stays the same size. Since WPF builds on a vector based rendering engine it’s incredibly easy to build scaleable user interfaces.