示例#1
0
            void IValueProvider.SetValue(string value)
            {
                if (value == null)
                {
                    throw new ArgumentNullException("value");
                }

                if (!IsEnabled())
                {
                    throw new ElementNotEnabledException();
                }

                PageTextBox owner = (PageTextBox)Owner;

                if (owner.IsReadOnly)
                {
                    throw new ElementNotEnabledException();
                }

                if (owner.IsValidInputString(value))
                {
                    owner.Text           = value;
                    owner._isEditingText = true;
                    owner.OnPageNumberEdited();
                }
            }
示例#2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="owner">Owner of the AutomationPeer.</param>
 public PageTextBoxAutomationPeer(PageTextBox owner)
     : base(owner)
 {
 }
示例#3
0
        /// <summary>
        /// Callback for the PageNumber DependencyProperty.  When this event is fired
        /// PageTextBox updates the page number it is displaying.
        /// </summary>
        /// <param name="d">The PageTextBox to update.</param>
        /// <param name="e">The associated arguments.</param>
        private static void OnPageNumberChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            PageTextBox PageTextBox = (PageTextBox)d;

            PageTextBox.SetPageNumber((int)e.NewValue);
        }