コード例 #1
0
        private void addContentToWhereClause(string content)
        {
            if (WhereClauseTB.Text == "")
            {
                WhereClauseTB.Text = content;
            }
            else
            {
                WhereClauseTB.SelectedText = " " + content + " ";
            }
            Dispatcher.BeginInvoke((ThreadStart) delegate
            {
                WhereClauseTB.Focus();

                WhereClauseTB.SelectionStart = WhereClauseTB.Text.Length;
                //Keyboard.Focus(WhereClause);
            });
        }
コード例 #2
0
        private void FieldItem_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            string fieldName = (sender as ListBoxItem).Content.ToString();

            if (WhereClauseTB.Text == "")
            {
                WhereClauseTB.Text = fieldName;
            }
            else
            {
                WhereClauseTB.SelectedText = " " + fieldName + " ";
            }
            Dispatcher.BeginInvoke((ThreadStart) delegate
            {
                WhereClauseTB.Focus();

                WhereClauseTB.SelectionStart = WhereClauseTB.Text.Length;
                //Keyboard.Focus(WhereClause);
            });
        }