Although the different kinds of WPF application types are useful, the core of any presentation framework is in the presentation elements themselves. In presentation systems of old, fundamentally we had "chunks of look and behavior" (often called controls) and "containers of chunks of look and behavior." In WPF, this characterization doesn't really hold up very well. Many elements that provide their own content and behavior can also be containers of elements (and so on). As an example, let's take a look at a Button.
The first thing that may surprise you about a WPF Button object is that you don't need to use a string as the content; it will take any .NET object. You've already seen a string as a button's content (see ).
Example . A button with string content
<Window ...>
<Button Width="100" Height="100">Hi</Button>
</Window>
However, as shows, you can also use an image (see ).
Example . A button with image content
<Window ...>
<Button Width="100" Height="100">
<Image Source="tom.png" />
</Button>
</Window>
You can even use an arbitrary control, like a TextBox, as shown in and .
Example . A button with control content
<Window ...>
<Button Width="100" Height="100">
<TextBox Width="75">edit me</TextBox>
</Button>
</Window>
Further, as you'll see in and , you can get fancy and show a collection of nested elements in a Button or even nonvisual objects as the content of a Button. The Button can take any object as content because it's derived ultimately from a class called ContentControl, as are many other WPF classes (e.g., Label, ListBoxItem, ToolTip, CheckBox, RadioButton, and, in fact, Window itself).
A ContentControl knows how to hold anything that's able to be rendered, not just a string. A ContentControl gets its content from the Content property, so you could specify a Button's content like so (this is the longhand version of ):
<Button Width="100" Height="100" Content="Hi" />
ContentControls are especially useful because you get all the behavior of the "thing" (e.g.,