Is there no Label control in Silverlight?

I can't seem to find a Label control in Silverlight. I get compile errors if I put anywhere in my XAML.

-------------Problems Reply------------

TextBlock is roughly the same as a Label from WinForms.

As per 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...

EDIT: I just noticed your tag for Silverlight 3. Label should be built into Silverlight 3 so are you sure your not using 2?

You might want to consider a TextBlock depending on how your using it. Again per 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.

Try this article. Apparently, you need to install the Silverlight Toolkit.

Just use the TextBlock...?


Category:silverlight Views:0 Time:2010-03-11

Related post

  • What options are there to make a list of labelled controls in Silverlight/WPF? 2010-08-10

    I have a lot of XAML that is in a complete mess and it's usually due to one thing. GRID, Grid.Column and Grid.Row craziness!! Now theres a few common ways you can make labelled lists in XAML:. With a <Grid> Advantages: Autosizing width of colum

  • Clone a control in silverlight 2008-09-01

    What's the best way to clone a control in Silverlight (including it's children)? UPDATE Is there a better way in Silverlight 2? --------------Solutions------------- Here's a great thread about serializing and deserializing objects in Silverlight 1.1.

  • What is the difference between the WPF TextBlock element and Label control? 2008-09-12

    This question already has an answer here: Difference between Label and TextBlock - WPF 3 answers Visually both of the following snippets produce the same UI. So why are there 2 controls.. Snippet1 <TextBlock>Name:</TextBlock> <TextBox

  • Flex 3: Different text styles within same label/control 2009-01-20

    Can anyone tell me if it's possible to have a the text in a single label control displayed in more than one style. e.g. I have a label I want the the text to appear with the style "english" (which it does), but I want the "th" of the text to be diffe

  • What's the Literal control used for and what's the difference to the Label Control in 2009-02-04

    What Literal control is used for in and What is the difference between them and Label control? --------------Solutions------------- The major difference is that the Label Control adds the span tag to the text (property) you set, allowing to

  • ASP.NET - Users have direct control on a Label control: this is safe? 2009-06-25

    I made a page where something entered in a TextBox, is displayed "as-is" on a Label control Since i am a beginner, I just made: Label1.Text = TextBox1.Text.ToLower(); Is this dangerous? I tried something but it seems that Label controls only takes te

  • A good rich text control for Silverlight 2009-09-03

    I'm looking for a good rich text control for Silverlight. The one on codeplex seems to be out of date and another free one I saw on vectorlight doesn't seem to save as RTF (it uses custom xml) or doesn't have printing capabilities. I'm thinking about

  • Problem databinding a custom control in silverlight 2009-09-22

    I'm attempting to databind a custom control in Silverlight 3 and I'm getting strange problems with it. My xaml for the user control is this: <UserControl x:Class="StronicoMain.GenericSmallIcon" xmlns="

  • How to display part of a string underlined to an Label control? 2009-09-24

    I have an asp Label control used for displaying error messages to the user. My client would like certain words in these messages to be underlined. How would this be accomplished? Thank you, James --------------Solutions------------- Simpler version o

  • How to clear datepicker control in silverlight? 2009-09-25

    I am using the standard datepicker control from silverlight. If i happen to type junk text into it and try to clear the data by setting the Text property to empty, it wouldn't clear the data. There is a method called ClearValue but not sure what to g

  • Funky Square replaces Tab-Space in Label Control 2009-09-30

    I have a few tab spaces with my text inside a TextBox, and when I set the Text property of a Label Control to the Text property of the TextBox, it loses those tab spaces and replaces them with squares. Can anybody please explain why this happens? ---

  • Enable or Disable mutiple controls in Silverlight 2009-10-14

    What is considered the best way of enabling or disabling multiple controls in Silverlight at the same time (textbox, combobox, autocompletebox and the like)? I suppose I could bind the "IsEnabled" property of each control to a boolean property. That

  • ASP.Net Display Different Text in Label Control At Interval 2009-10-19

    I have in here an old web application written in ASP.Net 2.0 + AJAX. I have in my page a textbox control and a button and a label control which is inside an update panel. A text will be entered into the textbox and subsequently, on the textchanged ev

  • Displaying label control depending on condition 2009-11-20

    I have three pages on my site. Page 1 is home page. When user visits the site, i display label control to user in Page 1. When the same user goes to page 2 , 3 and returns back to page 1, i do not want the label to show again. How can i do this? ----

  • Has anyone built a tabstrip control for Silverlight? 2009-12-14

    Obviously there are some proprietary controls such as Telerik, Syncfusion and Component Art - but I was wondering if anyone had attempted to build this type of control from scratch? I thought of overloading the tab control in silverlight 2? Anyone ha

  • Editable Label Controls 2010-02-22

    Does anybody know how I could go about creating an Editable Label Control? I need my users to be able to Edit Labels (Also change parts of its style info), but have found no helpful info anywhere online. Any help at all is appreciated Thank you -----

  • Creating a KeyDown Event Handler for the Label Control 2010-02-24

    I'm sure you're all aware of the fact that the Label Control has no KeyDown handler (and why would it?)... Anyway, I'm in need of a KeyDown handler for the Label Control and would appreciate any pointers/suggestions to get me started. I've searched a

  • Can I pass events like key strokes to another control in Silverlight? 2010-03-11

    Can I pass events like key strokes to another control in Silverlight? Imagine I'm in a custom control that contains a Textbox and a Treeview. I'm listening to a Key event for the TextBox. When the user pushes the Arrow Up or Arrow Down key, I want th

  • Using LINQ, how do you get all label controls 2010-04-07

    I want to get a collection of all label controls that are part of a user control. I have the following code: var labelControls = from Control ctl in this.Controls where ctl.GetType() == typeof(Label) select ctl; but the result is zero results. Please

Copyright (C), All Rights Reserved.

processed in 0.092 (s). 11 q(s)