GetItem() public method

public GetItem ( int index ) : ListItem
index int
return LayoutFarm.CustomWidgets.ListItem
Exemplo n.º 1
0
 void sgBox_UserConfirmSelectedItem(object sender, EventArgs e)
 {
     if (_textbox.CurrentTextSpan != null)
     {
         _textbox.ReplaceCurrentTextRunContent(_currentLocalText.Length,
                                               (string)_sgBox.GetItem(_sgBox.SelectedIndex).Tag);
         //-------------------------------------
         //then hide suggestion list
         _sgBox.ClearItems();
         _sgBox.Hide();
         //--------------------------------------
     }
 }
 void textSurfaceListener_PreviewEnterKeyDown(object sender, Text.TextDomEventArgs e)
 {
     //accept selected text
     if (!sgBox.Visible || sgBox.SelectedIndex < 0)
     {
         return;
     }
     if (textbox.CurrentTextSpan != null)
     {
         textbox.ReplaceCurrentTextRunContent(currentLocalText.Length,
                                              (string)sgBox.GetItem(sgBox.SelectedIndex).Tag);
         //-------------------------------------
         //then hide suggestion list
         sgBox.ClearItems();
         sgBox.Hide();
         //--------------------------------------
     }
     e.PreventDefault = true;
 }