Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8342879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T05:53:41+00:00 2026-06-09T05:53:41+00:00

Is it possible to add dynamic colors to a TextBlock ..i.e. have one character

  • 0

Is it possible to add dynamic colors to a TextBlock ..i.e. have one character in one color and the next in another color.

<TextBlock Text="{Binding no}" TextWrapping="Wrap" Margin="10,0,0,0" Style="{StaticResource PhoneTextSubtleStyle}" FontSize="40" Foreground="#A400C4FF" >
  // Can we add something here to specify what colours for what chars
</TextBlock>

Basically I input a dynamic 4 character sequence from no. I’ve bound it to this TextBlock inside a ListBox. Is it possible to have the characters in different colors.

If so is it possible to add these colors dynamically for eg. If I click a button certain characters change color?

Thank You. Any Help is appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T05:53:42+00:00Added an answer on June 9, 2026 at 5:53 am

    Actually, you can, which can come in handy when you’re doing a StringFormat on a data bound Textblock or a number of other places.

    If you did want to try it though, like here’s an SL example for a form label that puts a red asterisk next to the text Required Fields, but then can also add more stuff to it as shown in the example. Should work for Silverlight, WPF, UWP, etc…

    <TextBlock>
          <Run Text="*" Foreground="#FFE10101"/><Run Text="Required Line" />
          <Run Text="Red" Foreground="Red"/>
          <Run Text="Blue" Foreground="Blue"/>
          <Run Text="{Binding SomeString, StringFormat='Hell ya you can make \{0\} a different color!'}" Foreground="Orange"/>
    </TextBlock>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to add to PHP objects on the fly? Say I have
Is it possible to add a form to an email newsletter? I have tried
Suggest me the easiest possible way to add dynamic list(int) items. i.e List<int> list1=new
Okay, so this is a strange one... Is it possible to add namespaced members
is it possible to call a dynamic method in javascript. ie suppose i have
Is it possible to add a dynamic picture to a parameter in rdlc report?
I was wondering if it's possible to dynamically add subdomains that point to dynamic
In objective-c it is possible to add a @dynamic to a property. Is this
I want to add some dynamic content in from clause based on one particular
Is it somehow possible to add a dynamic Tile in WP7, where i take

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.