我似乎无法在Silverlight中找到Label控件.如果我把XAML放在任何地方,我会收到编译错误.
解决方法
TextBlock与WinForms中的Label大致相同.
按照MSDN:
The TextBlock control is the primary
element for displaying text in
Silverlight based applications.Provides a lightweight control for
displaying small amounts of text…
编辑:我刚刚注意到Silverlight 3的标签.标签应该内置在Silverlight 3中,所以你确定你不使用2吗?
您可能需要考虑TextBlock,具体取决于您使用它的方式.再次按照MSDN:
A Label control displays a caption,required field indicator,and validation error indicator to the user. It is typically used together with an input control,such as a TextBox. If you do not need to display required field or validation indicators,you can use the TextBlock control instead.