The Windows Presentation Foundation is Microsofts next generation UI framework to create applications with 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 the hardware acceleration of modern graphics cards. This makes the UI faster, scalable and resolution independent. The following illustration gives you an overview of the main features of WPF
WPF separates the appearance of a 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 data binding, events, and commands.
Controls in WPF are extremely composable. You can define almost any type of controls as the content of another. Although this flexibility sounds horrible to designers, it’s a very powerful feature if you use it appropriately. 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 separation 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 scalable user interfaces.