Fix suggest behavior in RadAutoCompleteBox to support spaces in the written text.
WORKAROUND:
public class MyAutoCompleteBox : RadAutoCompleteBox
{
public MyAutoCompleteBox()
{
this.ThemeClassName = typeof(RadAutoCompleteBox).FullName;
}
protected override RadTextBoxControlElement CreateTextBoxElement()
{
return new MyAutoCompleteBoxElement();
}
}
public class MyAutoCompleteBoxElement : RadAutoCompleteBoxElement
{
protected override Type ThemeEffectiveType
{
get { return typeof(RadAutoCompleteBoxElement); }
}
public override void CloseDropDown(RadPopupCloseReason reason)
{
if (reason == RadPopupCloseReason.CloseCalled)
{
if (this.ListElement.SuggestedText != null && this.ListElement.PatternText != null && this.ListElement.IsSuggestionMatched)
{
return;
}
}
base.CloseDropDown(reason);
}
protected override RadTextBoxListElement CreateListElement()
{
return new RadTextBoxListElement();
}
}