private static void OnSearchTextPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
AutoCompleteBox source = d as AutoCompleteBox;
if(source != null && source._ignorePropertyChange)
{
source._ignorePropertyChange = false;
return;
}
// Ensure the property is only written when expected
if(source != null && !source._allowWrite)
{
// Reset the old value before it was incorrectly written
source._ignorePropertyChange = true;
source.SetValue(e.Property, e.OldValue);
throw new InvalidOperationException(Dev2.Runtime.Configuration.Properties.Resources.AutoComplete_OnSearchTextPropertyChanged_InvalidWrite);
}
}
#endregion public string SearchText