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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T02:23:11+00:00 2026-05-11T02:23:11+00:00

Or, to be more clear, how can I format a block of text (in

  • 0

Or, to be more clear, how can I format a block of text (in my case, to be included within a tooltip) such that some portions of the text come from bound values.

In plain C# I would use:

_toolTip.Text = string.Format('{1:#0}% up, {2:#0}% down',     Environment.NewLine, percentageOne, percentage2); 

However the WPF XAML markup for a Text property seems able to contain only a single binding. The curly braces gave me high hopes, but this isn’t possible:

<Element>   <Element.Tooltip>     <!-- This won't compile -->     <TextBlock Text='{Binding Path=PercentageOne}% up, {Binding Path=PercentageTwo}% down'/>   </Element.Tooltip> </Element> 

I read that the Run.Text property is not a dependency property and can therefore not be bound.

Is there a way I can perform this formatting in XAML?

  • 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. 2026-05-11T02:23:12+00:00Added an answer on May 11, 2026 at 2:23 am

    You can use MultiBinding + StringFormat (requires WPF 3.5 SP1):

    <TextBox.Text>     <MultiBinding StringFormat='{}{1:#0}% up, {2:#0}% down'>       <Binding Path='PercentageOne' />       <Binding Path='PercentageTwo'/>     </MultiBinding> </TextBox.Text> 

    Regarding Run.Text – you can’t bind to it but there are some workarounds:

    • http://fortes.com/2007/03/20/bindablerun/
    • http://paulstovell.net/blog/index.php/attached-bindablerun/
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 65k
  • Answers 65k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Yes, in fact, std::map::erase() returns a size_type which indicates the… May 11, 2026 at 11:17 am
  • added an answer You shouldn't attempt to remove object from itself - it… May 11, 2026 at 11:17 am
  • added an answer The SQL Server has basic auditing which can audit logins… May 11, 2026 at 11:17 am

Related Questions

Or, to be more clear, how can I format a block of text (in
Is it legal to more or less copy (or euphemistically, be very inspired by)
When are objects or something else said to be "first-class" in a given programming
I'm working on a site which needs to be able to support two or
I have a java webapp that has to be deployed on either Win or
Ruby setters—whether created by (c)attr_accessor or manually—seem to be the only methods that need
Is it possible to set up a Grid or other container control to be
You and I want to be the expert on computer programming or website design,
I would like to be able to query whether or not a service is
Many developers seem to be either intimidated or a bit overwhelmed when an application

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.