/// <inheritdoc /> protected override AutomationPeer OnCreateAutomationPeer() { RadNumericBox parent = ElementTreeHelper.FindVisualAncestor <RadNumericBox>(this); if (parent != null) { return(new NumericTextBoxAutomationPeer(this, parent)); } return(base.OnCreateAutomationPeer()); }
/// <summary> /// Sets the value of the control. /// </summary> /// <param name="value">Sets the value of the control.</param> public void SetValue(double value) { if (!this.IsEnabled()) { throw new ElementNotEnabledException(); } RadNumericBox owner = (RadNumericBox)this.Owner; if ((value < owner.Minimum) || (value > owner.Maximum)) { throw new ArgumentOutOfRangeException("value"); } owner.Value = value; }
/// <summary> /// Initializes a new instance of the RadNumericBoxAutomationPeer class. /// </summary> /// <param name="owner">The RadNumericBox that is associated with this RadNumericBoxAutomationPeer.</param> public RadNumericBoxAutomationPeer(RadNumericBox owner) : base(owner) { }
/// <summary> /// Initializes a new instance of the NumericTextBoxAutomationPeer class. /// </summary> /// <param name="tBox">The TextBox that is associated with this NumericTextBoxAutomationPeer.</param> /// <param name="numeric">The RadNumeriBox that is associated with this NumericTextBoxAutomationPeer.</param> public NumericTextBoxAutomationPeer(TextBox tBox, RadNumericBox numeric) : base(tBox) { this.ParentNumericBox = numeric; }
private void InitNumericBox(RadNumericBox numericBox) { numericBox.Width = 200; }