示例#1
0
        /// <summary>
        /// Delegate called when the format string changed.
        /// </summary>
        /// <param name="pObject">The modified control.</param>
        /// <param name="pEventArgs">The event arguments.</param>
        private static void OnNumberDecimalDigitsChanged(DependencyObject pObject, DependencyPropertyChangedEventArgs pEventArgs)
        {
            ANumericUpDown <T> lNumericUpDown = pObject as ANumericUpDown <T>;

            if (lNumericUpDown != null)
            {
                lNumericUpDown.SyncTextAndValueProperties();
            }
        }
示例#2
0
        /// <summary>
        /// Delegate called when the unit symbol changed.
        /// </summary>
        /// <param name="pObject">The modified control.</param>
        /// <param name="pEventArgs">The event arguments.</param>
        private static void OnUnitSymbolChanged(DependencyObject pObject, DependencyPropertyChangedEventArgs pEventArgs)
        {
            ANumericUpDown <T> lNumericUpDown = pObject as ANumericUpDown <T>;

            if (lNumericUpDown != null)
            {
                lNumericUpDown.SyncTextAndValueProperties();

                // Foce the watermark refresh.
                lNumericUpDown.ForceWatermarkRefresh();
            }
        }