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

  • SEARCH
  • Home
  • 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 6942265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:59:34+00:00 2026-05-27T12:59:34+00:00

I am trying to style text on a page that contains TextBlocks and TextBlocks

  • 0

I am trying to style text on a page that contains TextBlocks and TextBlocks as the content of CheckBoxes

I want to do something like this (where textBlock is the TextBlock contained within the CheckBox – or anything that inherits from System.Windows.Controls.Control)

textBlock.Inlines.Add("unstyledText");
textBlock.Inlines.Add(new Run { Text = "yellowBoldText ", Foreground = new SolidColorBrush(Colors.Yellow), FontWeight = FontWeights.Bold });
textBlock.Inlines.Add("unstyledText");

This works on the TextBlocks that are not inside a CheckBox. If they are inside a CheckBox, the TextBlock’s Text property will change (ie. textBlock.Text == "unstyledText yellowBoldText unstyledText" returns true), but the text in the CheckBox will not visually change.

Is there anyway to get the TextBlocks inside a CheckBox to behave the same way as the other TextBlocks?

  • 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-05-27T12:59:34+00:00Added an answer on May 27, 2026 at 12:59 pm

    The CheckBox‘s style must be overriding the TextBlock‘s style in its States.

    Instead of having a TextBlock with Runs as a content of your CheckBox, try adding a horizontal StackPanel with TextBlocks.

    If the layout is not rendered as you would expect (for example WordWrap) try editing the style of the ComboBox.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying add a tab to my web page that looks like this: Using
I want to have a web page that contains 3 parts: A header at
Im trying to find all p tags with inline style attrs style=text-align:center; that contain
I'm trying add data triggers to the default combobox style so each text item
I'm trying to style an image with a white border around it like in
I'm trying to style a TreeView using this example and everything was working fine
I'm trying to style a select option list using CSS. I want more padding
I'm trying to style buttons to look like those I ask about in Android
I'm trying to style all <select> elements that are a descendant of a <div>
I'm sure that I'm missing something simple to get this implemented, but have run

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.