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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:58:28+00:00 2026-05-27T07:58:28+00:00

based on this example http://msdn.microsoft.com/en-us/library/system.windows.data.binding.validatesonexceptions.aspx It seems that ValidatesOnExceptions is responsable to catch the

  • 0

based on this example

http://msdn.microsoft.com/en-us/library/system.windows.data.binding.validatesonexceptions.aspx

It seems that ValidatesOnExceptions is responsable to catch the custom exception and add it to Validation.Errors collection.

The problem is I have the same behavior even with ValidatesOnExceptions set to false

Could someone explain what I am missing?

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-27T07:58:29+00:00Added an answer on May 27, 2026 at 7:58 am

    ValidatesOnExceptions is for custom exception display. But if you have TextBox bound to an int property then before the binding happen a conversion occurs which could cause “red border”.

    To try it out

    <TextBox Text="{Binding IntField}"/>
    <TextBox Text="{Binding StringField, ValidatesOnExceptions=False}"/>
    <TextBox Text="{Binding StringField, ValidatesOnExceptions=True}"/>
    
    public int IntField { get; set; }
    
    private string stringField;
    public string StringField
    {
        get { return stringField; }
        set
        {
            throw new Exception();  text = stringField; }
        }
    }
    

    Type a number to each textbox:

    1. Red border because of data conversion
    2. No red border becauseValidatesOnExceptions false
    3. Red border because ValidatesOnExceptions
      true

    I hope it helped.

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

Sidebar

Related Questions

According to http://msdn.microsoft.com/en-us/library/system.data.datatable.clone.aspx If these classes have been derived, the clone will also be
I am trying to create LinqToSql classes based on this article http://msdn.microsoft.com/en-us/library/bb425822.aspx I couldn't
I'm trying to implement a simple TPH example from http://msdn.microsoft.com/en-us/library/dd793152.aspx . I have two
In C following this article ( http://blogs.msdn.com/oldnewthing/archive/2006/12/21/1340571.aspx ), we have succesfully been able to
Library at http://testapi.codeplex.com/ Excerpt of usage from http://blogs.msdn.com/ivo_manolov/archive/2008/12/17/9230331.aspx A third common approach is forming
I have developed a compass based on this example: http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/graphics/Compass.html Since my app only
So I'm creating a custom ActionFilter that's based mostly on this project http://www.codeproject.com/KB/aspnet/aspnet_mvc_restapi.aspx .
Based in this example http://jsfiddle.net/Nb3uW/30/ how can make it to show each link the
Let's say I have a URL: http://example.com/person/list This website will display a list of
I'm doing some SOAP exercises based on this example: http://www.vankouteren.eu/blog/2009/03/simple-php-soap-example/ But, I cannot get

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.