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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T15:24:59+00:00 2026-06-06T15:24:59+00:00

What is the difference between .Net 3.5 and 4.0 when using the StringFormat in

  • 0

What is the difference between .Net 3.5 and 4.0 when using the StringFormat in a property binding?

I have a WPF window with just a textbox whos Text property binds to a property of type double. In 3.5 the textbox works as expected when I edit the number but in 4.0 I can only edit one side of the decimal place and using backspace or delete causes strange formatting to occur and overwriting of data. The best way to show this would be to try the example targeting different frameworks.

 <TextBox FontSize="16" Text="{Binding Path=SetPoint, UpdateSourceTrigger=PropertyChanged, StringFormat=0.000}"  Margin="185,130,209,146" />

Also I have noticed that when I removed the UpdateSourceTrigger then the .Net 4.0 works like the 3.5 version. Were the the UpdateSourceTriggers reversed in the different versions?

 <TextBox FontSize="16" Text="{Binding Path=SetPoint, StringFormat=0.000}"  Margin="185,130,209,146" />
  • 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-06T15:25:01+00:00Added an answer on June 6, 2026 at 3:25 pm

    I believe this Microsoft Connect issue describes the problem that you are seeing.

    In 3.5, the binding would write a new value back to the source after each keystroke, without changing the TextBox text. But that text might not represent the source’s value accurately, perhaps because it doesn’t include formatting and conversion, or because the source changed the value (in the property-setter) to something else. This led to frequent and vehement complaints – people wanted the TextBox to show the source’s value, exactly as a TextBlock would if bound to the same property with the same converters and formatting. The UI should display what’s actually in the data, not what the end-user typed.

    To fix this class of bugs in 4.0, the binding now applies formatting and conversion to the source’s new value after every update. (LostFocus bindings already did this in 3.5.) The TextBox now shows what’s in the data, but that can make the user’s typing more complex.

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

Sidebar

Related Questions

What is the difference between using the OnClick attribute of an ASP.Net Button: <asp:Button
I am looking at differences between using WPF in .NET or using Silverlight 4
What is the difference between using padding-left and margin-left in the following example? http://jsfiddle.net/bt49e/1/
In aspx.net, what is the difference between Context.User.Identity.Name and HttpContext.Current.User.Identity.Name Im currently using the
What is the difference between Request and Response terminologies in ASP.net? I am using
In asp.net webpages framework what is the difference between using a content block versus
What's the difference between calling .NET methods asynchronously by using: BeginInvoke/EndInvoke vs. IAsynchResult vs.
I'm just getting started with ASP.NET MVC. What is the difference between MapRoute and
Could you please tell me the difference between using asp.net validator controls vs JQuery
What is the difference between using ToString and ToString() in VB.NET?

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.