Is there a Label control in WP7?

Is there a Label control in WP7? I don't mind re-creating it from scratch, but I don't want to invent a dummy hook if I don't need it.

+5
source share
2 answers

Shortcuts are not supported, but you can use TextBlock instead . However, this is not a direct replacement, and this post highlights some of the differences.

Although the TextBlock lives in the System.Windows.Controls namespace, this is not a control. It comes directly from FrameworkElement. Label, on the other hand, comes from ContentControl. This means this shortcut can:

  • Get the user control template (via the Template property).
  • , ( Content).
  • DataTemplate ( ContentTemplate).
  • , ContentControl , FrameworkElement .

! Label , TextBlock ....

+10

video (0:52) .

+1

All Articles