private bool IsInputValid() { ProfileNameTextBox.GetBindingExpression(TextBox.TextProperty).UpdateSource(); PasswordTextBox.GetBindingExpression(PasswordHelper.PasswordProperty).UpdateSource(); PasswordRepeatTextBox.GetBindingExpression(PasswordHelper.PasswordProperty).UpdateSource(); bool valid = true; if (Validation.GetErrors(ProfileNameTextBox).Count != 0) { valid &= false; } if (Validation.GetErrors(PasswordTextBox).Count != 0) { valid &= false; } if (Validation.GetErrors(PasswordRepeatTextBox).Count != 0) { valid &= false; } return(valid); }
private void UpdateTargets() { ButtonSwapCheck.GetBindingExpression(System.Windows.Controls.Primitives.ToggleButton.IsCheckedProperty).UpdateTarget(); MouseSpeedSlider.GetBindingExpression(System.Windows.Controls.Primitives.RangeBase.ValueProperty).UpdateTarget(); WheelLinesSlider.GetBindingExpression(System.Windows.Controls.Primitives.RangeBase.ValueProperty).UpdateTarget(); DoubleClickTimeSlider.GetBindingExpression(System.Windows.Controls.Primitives.RangeBase.ValueProperty).UpdateTarget(); ProfileNameTextBox.GetBindingExpression(System.Windows.Controls.TextBox.TextProperty).UpdateTarget(); }