Exemplo n.º 1
0
 /// <summary>
 /// 把选中的提示放到输入框中,并关闭提示
 /// </summary>
 private void UseIntelliThenClose()
 {
     if (intelliLst.SelectedItem != null)
     {
         string tagName = IntelliUtils.EscapeTagName(
             (intelliLst.SelectedItem as IntelliItem).Name);
         int    prefixLen         = IntelliUtils.ExtractPrefix(tagSearchBox.Text).Length;
         string textWithoutPrefix = tagSearchBox.Text.Substring(
             0, tagSearchBox.Text.Length - prefixLen);
         tagSearchBox.Text       = textWithoutPrefix + tagName + "\" ";
         tagSearchBox.CaretIndex = tagSearchBox.Text.Length;
     }
     intelliPopup.IsOpen = false;
 }