//---------------------------------------------------------------------------------------------------------
            /// <summary>
            /// Обработчик события изменения максимального/минимального значения величины
            /// </summary>
            /// <param name="sender">Источник события</param>
            /// <param name="args">Аргументы события</param>
            //---------------------------------------------------------------------------------------------------------
            private static void OnMaxMinValueChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)
            {
                CubeXMeasurementEditor spin_editor = (CubeXMeasurementEditor)sender;

                if (args.Property == MinValueProperty)
                {
                    Double min_value = (Double)args.NewValue;
                    if (spin_editor.Value.Value < min_value)
                    {
                        spin_editor.Value = spin_editor.Value.Clone(min_value);
                        spin_editor.SetPresentValue();
                        spin_editor.RaiseEvent(new RoutedEventArgs(ValueChangedEvent));
                    }
                }
                else
                {
                    Double max_value = (Double)args.NewValue;
                    if (spin_editor.Value.Value > max_value)
                    {
                        spin_editor.Value = spin_editor.Value.Clone(max_value);
                        spin_editor.SetPresentValue();
                        spin_editor.RaiseEvent(new RoutedEventArgs(ValueChangedEvent));
                    }
                }
            }
            //---------------------------------------------------------------------------------------------------------
            /// <summary>
            /// Обработчик события изменения значения
            /// </summary>
            /// <param name="sender">Источник события</param>
            /// <param name="args">Аргументы события</param>
            //---------------------------------------------------------------------------------------------------------
            private static void OnValueChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)
            {
                CubeXMeasurementEditor spin_editor = (CubeXMeasurementEditor)sender;

                spin_editor.SetPresentValue();

                spin_editor.RaiseEvent(new RoutedEventArgs(ValueChangedEvent));
            }
            //---------------------------------------------------------------------------------------------------------
            /// <summary>
            /// Обработчик события изменения значения по умолчанию
            /// </summary>
            /// <param name="sender">Источник события</param>
            /// <param name="args">Аргументы события</param>
            //---------------------------------------------------------------------------------------------------------
            private static void OnValueDefaultChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)
            {
                CubeXMeasurementEditor spin_editor = (CubeXMeasurementEditor)sender;
                Double new_value = (Double)args.NewValue;

                spin_editor.Value = spin_editor.Value.Clone(new_value);
                spin_editor.SetPresentValue();
                spin_editor.RaiseEvent(new RoutedEventArgs(ValueChangedEvent));
            }