private static void OnMinDecimalPlacesChanged(DependencyObject element,
                                                      DependencyPropertyChangedEventArgs e)
        {
            NumericUpDownFloat control = (NumericUpDownFloat)element;

            control.InvalidateProperty(DecimalPlacesProperty);
        }
        private static void OnDecimalPlacesChanged(DependencyObject element,
                                                   DependencyPropertyChangedEventArgs e)
        {
            NumericUpDownFloat control = (NumericUpDownFloat)element;
            Int32 decimalPlaces        = (Int32)e.NewValue;

            control.m_culture.NumberFormat.NumberDecimalDigits = decimalPlaces;

            if (control.IsDecimalPointDynamic)
            {
                control.IsDecimalPointDynamic = false;
                control.InvalidateProperty(ValueProperty);
                control.IsDecimalPointDynamic = true;
            }
            else
            {
                control.InvalidateProperty(ValueProperty);
            }
        }