예제 #1
0
        private void CardListbox_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            ListBoxItem item = ItemsControl.ContainerFromElement(sender as ListBox, e.OriginalSource as DependencyObject) as ListBoxItem;

            if (item != null)
            {
                ExprElement element = item.DataContext as ExprElement;
                InputTextBox.Text       = element.PrevInput;
                InputTextBox.CaretIndex = element.PrevInput.Length;
                InputTextBox.ScrollToEnd();
            }
        }