WPF provides new techniques for application development, and makes better use of current hardware and technologies. These significant advances include several features that relate to the layout and control of applications, as described in the following table.

 

Feature

Description

Layout WPF provides layout elements to enable you to build an adaptable user interface. These elements include a flow-style layout, where content flows left to right and then onto the start of the next line. WPF also provides a grid, which enables table-like layouts.
 

 

The grid layout enables you to resize content automatically or proportionally. You can nest layout elements to produce complex layouts and write new element types if the built-in types are not suitable.

Content Model The templates for many controls, such as labels and captions, contain placeholders for additional content, which allows for the composition of elements. Traditionally, these placeholders allowed only text, or sometimes a bitmap. WPF has a flexible content model that enables you to use any content in these placeholders, including other controls, drawings, or animations.
 

 

This lack of restrictions enables a host of visual design possibilities and includes a great deal of power for visual designers.

Lookless Controls In WPF, most controls are lookless because WPF disassociates the appearance from the control. Controls provide behavior, but you can easily customize the entire appearance of a control without the need to write a custom control. Controls usually have a built-in template that provides a default appearance; however, you can replace this template to change the look of the control.
 

 

This feature means that WPF controls are much more flexible than Windows Forms or Win32 user interface components.

Data binding With WPF controls, you can use anything as the content of the control, including dynamic content from a data source.
 

 

WPF data binding provides a simple and consistent way for applications to present and interact with data. You can bind elements to data from a variety of data sources and use data templates to specify how a control must display an object. Data templates act as a bridge between objects and the user interface, and give designers great flexibility to manage data presentation.

Styles Styles are lists of properties and values that enable consistency across an application. You can apply a style to any element in a user interface and use a style to set any property.
 

 

You can only apply a style to framework elements. Styles are a declarative feature and this enables you to manage the look of an application independently of its behavior and structure.

Triggers A trigger is a declarative mechanism that specifies how a control should respond to certain stimuli. You can declare a trigger inside a style or a template. One use of a trigger is to start an animation.
 

The declarative nature of triggers enables designers to create a user interface that responds to actions without the need for code from a developer.