void textSurfaceListener_PreviewEnterKeyDown(object sender, Text.TextDomEventArgs e)
{
//accept selected text
if (!listView.Visible || listView.SelectedIndex < 0)
{
return;
}
if (textbox.CurrentTextSpan != null)
{
textbox.ReplaceCurrentTextRunContent(currentLocalText.Length,
(string)listView.GetItem(listView.SelectedIndex).Tag);
//-------------------------------------
//then hide suggestion list
listView.ClearItems();
listView.Visible = false;
//--------------------------------------
}
e.PreventDefault = true;
}
static string GetString(char[] buffer, LayoutFarm.Composers.TextSplitBound bound)