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 9186027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:25:24+00:00 2026-06-17T19:25:24+00:00

About TextBlock UIElement in C#, we could add several Run object into it, which

  • 0

About TextBlock UIElement in C#, we could add several Run object into it, which will be appended to inlines property. That’s one way we show several pieces of text with different format(font, size and etc) in one TextBlock.

My question is: when I add, such as, two Run object into one TextBlock, there exist a padding between each Run object. For example, I add “12” and “34” Run objects, and finally they will be shown as “12 34” in the view. But what I need is they should be connected together as one word – “1234” – without that padding

Is there any setting we can use to prevent this padding?

  • 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-17T19:25:25+00:00Added an answer on June 17, 2026 at 7:25 pm

    Instead of

    <TextBlock>
        <Run Text="12"/>
        <Run Text="34"/>
    </TextBlock>        
    

    write the runs in one line like this

    <TextBlock>
        <Run Text="12"/><Run Text="34"/>
    </TextBlock>
    

    And the space will be gone.

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

Sidebar

Related Questions

I have ran into a problem that I am completely clueless about. I am
If you followed a DM course, which textbook was used? I know about Data
I have about 45 decently large images (about 680x1000) that need to be loaded
I want a textblock that has blue text on a yellow background. I can
I have a window in one assembly that has a TextBlock control that I
I want to have four colored areas which are clickable. I can user TextBlock
Supposing that I have two TextBlock elements, one being a label for the second,
I wanted to create a button that had an image and a textblock as
I'm trying to understand what it is about the following code that is perfectly
I have a Textblock which Text attribute is binding to a DateTime? type data,

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.