AutoCompleteBox and Enter key

Feb 24, 2011 at 6:46 AM
Edited Feb 24, 2011 at 6:46 AM

I want to accomplish that AutoCompleteBox accepts enter key, so that user can type new line in the AutoCompleteBox. 
Is it possible, or applicable?

According to documentation (MSDN) I have created TextBox style
<Style  x:Key="myTBStyle" TargetType="TextBox">
<Setter Property="TextWrapping" Value="Wrap"></Setter>
<Setter Property="VerticalScrollBarVisibility" Value="Visible"></Setter>
<Setter Property="AcceptsReturn" Value="True"></Setter>
</Style>
, that is applied to the AutoCompleteBox

<input:AutoCompleteBox TextBoxStyle="{StaticResource myTBStyle}" 

But when user pres the enter key  AutoCompleteBox.OnKeyDown event handler is called (AutoCompleteBox.cs, line 2652) and where the Key.Enter  is handled in the standard way, like commit event.

Thanks in advance,

Sanjin