Пример #1
0
        //Restrict OffSetValue between 0 and 200 %;

        private static object OnCoerceInnerRadiusOffset(DependencyObject obj, object baseValue)
        {
            CircleVisual shape = (CircleVisual)obj;
            int          value = (int)baseValue;

            if (value < 0)
            {
                value = 0;
            }
            if (value > 200)
            {
                value = 200;
            }

            return(value);
        }
Пример #2
0
        private static object OnCoerceRotationAngle(DependencyObject obj, object baseValue)
        {
            CircleVisual shape = (CircleVisual)obj;
            double       value = (double)baseValue;

            if (value < 0)
            {
                value = 0;
            }

            if (value > 360)
            {
                value = 360;
            }

            return(value);
        }