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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:27:52+00:00 2026-05-13T08:27:52+00:00

I am new to WPF and am trying to create a WPF control that

  • 0

I am new to WPF and am trying to create a WPF control that displays a string (which will always be a number) in a particular way. There will be three different text fields on the control and the string needs to be split up into three different components following these rules:

Lets say you have the string “1.5678”. The control needs to display the string as follows, in the three text fields:
textField1 = “1.5”
textField2 = “67”
textField3 = “8”

The rule is that textField3 will always contain the last character, textField2 will contain the two chars before the last one, and textField1 will contain the rest. Here are some more examples:

“145.670”
textField1 = “145.”
textField2 = “67”
textField3 = “0”

“15.839”
textField1 = “15.”
textField2 = “83”
textField3 = “9”

Assume that the string will always contain at least 4 characters.

Now, is there a way I can use the new WPF binding features to do this for me automatically? Can I bind the WPF control to some property that contains the string and have the text boxes just display it as I described?

Thanks

  • 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-13T08:27:53+00:00Added an answer on May 13, 2026 at 8:27 am

    You could do this via binding (to a single property), by using an IValueConverter for your binding. The docs for the IValueConverter give a sample implementation.

    Each control could have a converter that specifies which portion to display, and your text box binding would then just do the conversion for you.

    Note that you could do this by either using three separate converter classes, or one class with an enum that specified which portion to display (which would still require three unique instances).

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

Sidebar

Related Questions

I'm trying to create a control in wpf/xaml that will display a horizontal list
I am trying to create a new WPF control called NumericTextBox . It inherits
I am trying to create a simple User Control (not WPF) in VS2008 which
I am new to WPF. I'm trying to build an application which has a
I have a WPF application where I'm trying to create a diagnostics panel that's
I'm trying to create a custom file upload control in WPF 4.0 and I'm
I am new to WPF and am trying to find the right control. I
I am trying to create a WPF control at runtime, but I can't figure
I'm trying to create a cmd file that will install a .msi and then
I have a custom WPF user control called a TimeoutPanel that I am trying

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.