Bold text in Label

Thread is closed for posting
3 posts, 1 answers
  1. Ian
    Ian avatar
    129 posts
    Member since:
    Jun 2009

    Posted 17 Mar 2015 Link to this post

    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. Answer
    Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 17 Mar 2015 Link to this post

    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.

     
  3. Ian
    Ian avatar
    129 posts
    Member since:
    Jun 2009

    Posted 17 Mar 2015 in reply to Vlad Link to this post

    Hi Vlad,
    I thought I'd read all of the documentation but I must have missed the formattedText property!

    That works great.
    Thanks, Ian
Back to Top