This is a migrated thread and some comments may be shown as answers.

Bold text in Label

2 Answers 1188 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ian
Top achievements
Rank 1
Ian asked on 17 Mar 2015, 02:06 PM
Hi,
Is there a way to specify that text in a Label should be displayed in bold font? I tried applying a CSS style that included the following rule but that doesn't seem to be supported?

font-weight:bold;

Regards, Ian

2 Answers, 1 is accepted

Sort by
0
Accepted
Vlad
Telerik team
answered on 17 Mar 2015, 02:45 PM
Hello Ian,

You can use formattedText property. Here is an example:
               <Label>
                  <Label.formattedText>
                    <FormattedString fontSize="18" foregroundColor="#FF0000">
                      <FormattedString.spans>
                        <Span text="Your text" fontAttributes="Bold" />
                      </FormattedString.spans>
                    </FormattedString>
                  </Label.formattedText>
                </Label>

Regards,
Vlad
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Ian
Top achievements
Rank 1
answered on 17 Mar 2015, 04:46 PM
Hi Vlad,
I thought I'd read all of the documentation but I must have missed the formattedText property!

That works great.
Thanks, Ian
Tags
General Discussions
Asked by
Ian
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Ian
Top achievements
Rank 1
Share this question
or