I have a property related to ComboBox
<ComboBox ItemsSource="{Binding AvailableTypes}"
SelectedValue="{Binding Kind, Mode=TwoWay}}"/>
and in the property adjuster, I make an exception in some business circumstances to interrupt the property setting.
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 runs smoothly, except that VS2010 appears every time I throw an exception. Is there any exception for a raise or attribute to set so that the debugger stays in the background?
source
share