private void ResetOptionsButton_Click(object sender, RoutedEventArgs e) { this.DependencyComboBox.SelectedIndex = (int)DependencyType.Standard; this.SaveToPackageJsonCheckbox.IsChecked = true; ArgumentsTextBox.Text = string.Empty; ArgumentsTextBox.GetBindingExpression(TextBox.TextProperty).UpdateSource(); }
private void ArgumentsReplacementItemt_Click(object sender, RoutedEventArgs e) { MenuItem item = (MenuItem)sender; int selectionStart = ArgumentsTextBox.SelectionStart; ArgumentsTextBox.Text = ArgumentsTextBox.Text.Substring(0, ArgumentsTextBox.SelectionStart) + item.Header.ToString() + ArgumentsTextBox.Text.Substring(ArgumentsTextBox.SelectionStart, ArgumentsTextBox.Text.Length - ArgumentsTextBox.SelectionStart); ArgumentsTextBox.SelectionStart = selectionStart + item.Header.ToString().Length; ArgumentsTextBox.Focus(); }