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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T16:13:41+00:00 2026-06-05T16:13:41+00:00

As you know StringFormat is of great importance for data representation in WPF. My

  • 0

As you know StringFormat is of great importance for data representation in WPF. My problem is how to use StringFormat when multibinding in WPF?

If I give a very simple example:

We have variables,which are A and B and whose values are 10.255555 and 25.6999999

And we want to show them 10.2,25.6?

How can I do this with multibinding? Normally it is piece of cake with ValueConverter

Any help and ideas on this topic will be greately 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-05T16:13:42+00:00Added an answer on June 5, 2026 at 4:13 pm

    Just set the StringFormat property on the MultiBinding; use placeholders ({0}, {1}…) for each binding in the multibinding, and include format specifiers if necessary (e.g. F1 for a decimal number with 1 decimal digit)

    <TextBlock>
        <TextBlock.Text>
            <MultiBinding StringFormat="{}{0:F1}{1:F1}">
                <Binding Path="A" />
                <Binding Path="B" />
            </MultiBinding>
        </TextBlock.Text>
    </TextBlock>
    

    The {} part at the beginning is the format string is an escape sequence (otherwise the XAML parser would consider { to be the beginning of a markup extension)

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

Sidebar

Related Questions

I am trying to use StringFormat on DisplayMemberPath property of a ComboBox (WPF). But
I know that WPF 3.5 SP1 supports a StringFormat in a binding, but can
I have read so many blogs and find out we cna use stringFormat property
Anyone know if it is possible to make the PeriodicalUpdater pass the data it
I know in C# you can use String.Format method. But how do you do
I have followed this Wordpress tutorial which works great. I have used a listview
I am trying to format a {datetime?} property with stringFormat, but I don't know
In winforms app I use Graphics.DrawString(String, Font, Brush, RectangleF, StringFormat) with StringTrimming.EllipsisWord for the
As you know we use LinQ Technology to SQL Classes for send and get
I've got a very simple object: public class DocumentType { private int id; private

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.