The first control added in the StackPanel is a very basic label, which has plain text as its Content property. The second Label control also contains plain text, but has various formatting (such as, FontWeight, Foreground, and FontStyle) applied to it to give it a bold, italic, and red color look to its style.
As the Label control derives from System.Windows.Controls.ContentControl, it also supports adding other controls to its content. The third label added to the UI is a little different than the previous two examples. It not only contains text, but also other controls, such as StackPanel, TextBlock, and a Rectangle, owing to its Content property.
In the preceding example, for the third label, the TextBlock control is used to hold the actual text content, and StackPanel is used as a panel control to hold both the TextBlock and the Rectangle.