TextBlock is not a control
Even though TextBlock
lives in the System.Windows.Controls namespace, it is not a control. It derives directly from FrameworkElement
. Label, on the other hand, derives from ContentControl
. This means that Label
can:
- Be given a custom control template (via the
Template
property).
- Display data other than just a string (via the
Content
property).
- Apply a
DataTemplate
to its content (via the ContentTemplate
property).
Do whatever else a ContentControl
can do that a FrameworkElement
cannot.
Label
text is grayed out when disabled
Label
supports access keys
Label
is much heavier than TextBlock
Source
Some more interesting reads below
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…