×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Nov 2013
    Posts
    1

    Question How to creat Custom colored text in text block ?

    How to creat Custom colored text in text block ?

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2013
    Location
    Dublin, Ireland
    Posts
    574

    Re: How to creat Custom colored text in text block ?

    Quote Originally Posted by sskiki View Post
    How to creat Custom colored text in text block ?
    Use the Foreground property ?

  3. #3
    Regular Contributor
    Join Date
    Jun 2013
    Posts
    53

    Re: How to creat Custom colored text in text block ?

    The question is a bit vague, but if you want to have several parts in one text being in a different colour, you'll need to check out the RichTextBox control! http://msdn.microsoft.com/en-us/libr...v=vs.105).aspx

  4. #4
    Registered User
    Join Date
    Nov 2013
    Posts
    29

    Re: How to creat Custom colored text in text block ?

    Quote Originally Posted by Depechie View Post
    The question is a bit vague, but if you want to have several parts in one text being in a different colour, you'll need to check out the RichTextBox control! http://msdn.microsoft.com/en-us/libr...v=vs.105).aspx
    not necessarily, you can use a normal TextBlock with <Run /> tags like this:

    Code:
    <TextBlock>
        <Run Text="White" />
        <Run Foreground="Red" Text="Red" />
        <Run Foreground="Blue" Text="Blue" />
        <Run Foreground="Green" Text="Green" />
    </TextBlock>
    and the result would be something like this

Similar Threads

  1. How to creat Custom colored text in text block ?
    By Ahmed Emad in forum Windows Phone General
    Replies: 7
    Last Post: 2013-04-15, 09:28
  2. Offscreen image and colored text not working
    By vahur12 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 5
    Last Post: 2010-07-25, 17:55
  3. Colored text in context sensitive help contents
    By jeetu_basai in forum Symbian User Interface
    Replies: 0
    Last Post: 2010-06-16, 05:36
  4. Custom text box..
    By vishwas_vincy11 in forum Symbian User Interface
    Replies: 2
    Last Post: 2006-09-13, 11:40
  5. Scrolling text in with a custom UI.
    By Subotai4Winds in forum Symbian
    Replies: 1
    Last Post: 2005-02-04, 05:02

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×