예제 #1
0
            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();
                }
            }
예제 #2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="owner">Owner of the AutomationPeer.</param>
 public ZoomComboBoxBoxAutomationPeer(ZoomComboBox owner)
     : base(owner)
 {
 }
예제 #3
0
        /// <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);
        }