void IValueProvider.SetValue(string value) { if (value == null) { throw new ArgumentNullException("value"); } if (!IsEnabled()) { throw new ElementNotEnabledException(); } ZoomComboBox owner = (ZoomComboBox)Owner; if (owner.IsReadOnly) { throw new ElementNotEnabledException(); } if (owner.IsValidInputString(value)) { owner.Text = value; owner._isEditingText = true; owner.OnZoomValueEdited(); } }
/// <summary> /// Constructor /// </summary> /// <param name="owner">Owner of the AutomationPeer.</param> public ZoomComboBoxBoxAutomationPeer(ZoomComboBox owner) : base(owner) { }
/// <summary> /// Callback for the Zoom DependencyProperty. /// </summary> /// <param name="d">The ZoomComboBox to update</param> /// <param name="e">The associated arguments.</param> private static void OnZoomChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ZoomComboBox zoomComboBox = (ZoomComboBox)d; zoomComboBox.SetZoom((double)e.NewValue); }