For a client, I am currently writing a big WPF application. All the clients are still using Windows XP, but since the users seem to like the application more when Aero is being used, we decided to use the Aero theme that comes with WPF.
By default, the Aero theme is great, but there are some things I don’t like about the themes. Actually, none of the themes support what I need, and that is a default margin for all controls. For example, if you create a Grid and place some text elements (Label or TextBlock) and a TextBox, you want automatic spacing, right? Or are you one of the hundreds that set the margins for all controls manually or define them in the grid?
A lot of blogs on the internet already handle the discussion Label vs. TextBlock, and all I read have this bottom line: “TextBlock is lighter, so use it if you don’t need the Accelerator feature of the Label control”.
I don’t agree with this conclusion, because Label is used to display text as a label. TextBlocks are used in a lot of controls to display text. So, if you use TextBlock as a replacement for the Label control, you will see this result when you increase the margin of the text displayed before TextBoxes:
Figure 1 - Using TextBlock
Figure 2 - Using Label
As you can see, figure 2 does what it should do (according to the design). The labels have an automatic margin so all controls and spacing is done automatically by the parent control (in this case a Grid inside a Tab Control).
If you want to use styles in WPF correctly (and you need to modify the margin, etc), I recommend to use a Label instead of a TextBlock. TextBlocks are used inside a lot of controls, and modifying the TextBlock style has a major impact on how most controls (such as a Button, ComboBox, GridView Columns, etc) behave.
So, if you want to display text as a control itself, always use Label. The benefits of showing styles correctly (and have more control over styles and themes) are better than the fact that a TextBlock is lighter (anyone having problems with the performance of WPF regarding Labels, never heard of it).