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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:47:46+00:00 2026-05-22T15:47:46+00:00

I have a property bound to ComboBox <ComboBox ItemsSource={Binding AvailableTypes} SelectedValue={Binding Kind, Mode=TwoWay}}/> and

  • 0

I have a property bound to ComboBox

    <ComboBox ItemsSource="{Binding AvailableTypes}"
            SelectedValue="{Binding Kind, Mode=TwoWay}}"/>

and in the property setter I throw an exception in some business circumstances to abort setting the property.

    public MyKind Kind
    {
        get { return kind; }
        set 
        {
            if (kind != value)
            {
                if (SomeRuleFailed(value))
                throw new Exception("to be ate by binding code");
                kind = value;
            }
        }
    }

It works smooth except the fact that VS2010 pops up every time I raise exception. Is there any kind of exception to raise or attribute to be set so debugger left in background?

  • 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-22T15:47:46+00:00Added an answer on May 22, 2026 at 3:47 pm

    You should not be throwing an instance of an Exception class. You should throw an instance of a class derived from Exception.

    You can create your own exception class (and you should out of habit if you have something that’s not already covered by the framework) then you can select the exceptions you want Visual Studio to break on.

    Once you’ve created your exception class, go to Debug–>Exceptions… and then pick the exceptions you want to have the debugger break on.

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

Sidebar

Related Questions

I have a TextBox.TextProperty bound to a ViewModel property. In the binding I have
I have a ComboBox that doesn't seem to update the SelectedItem/SelectedValue. The ComboBox ItemsSource
I have a WPF CombBox as follows: <ComboBox ItemsSource={Binding Source={StaticResource myList}} SelectedItem={Binding Path=mySelectedItem} />
I have a ComboBox that has its ItemsSource bound to a static List<CustomSettings> of
I have a combobox where the SelectedValue on the combo is bound to a
I have a ComboBox with its Items property bound to a collection of objects.
In XAML I have a combobox defined as: <ComboBox x:Name=UsernameComboBox ItemsSource={Binding Users} DisplayMemberPath=Username SelectedItem={Binding
I have a textbox with the Text property bound to a dataset column with
I have a GridView where one column is bound to an object property containing
I have a ComboBox (Windows Forms) that is bound to a List. It is

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.