public MDRadialProgressLabel(RectangleF frame, MDRadialProgressTheme theme)
            : base(frame)
        {
            var center = new PointF(frame.X + frame.Width / 2, frame.Y + frame.Height / 2);

            Center = center;

            var offset = theme.Thickness;

            var sideDimension = Math.Min(frame.Width, frame.Height) - offset;
            var adjustedFrame = new RectangleF(frame.X + offset, frame.Y + offset, sideDimension, sideDimension);
            Bounds = adjustedFrame;

            Font = theme.Font;
            TextAlignment = UITextAlignment.Center;
            TextColor = theme.LabelColor;
            PointSizeToWidthFactor = 0.5f;
            AdjustFontSizeToFitBounds = true;

            if (theme.DropLabelShadow)
            {
                ShadowColor = theme.LabelShadowColor;
                ShadowOffset = theme.LabelShadowOffset;
            }

            Lines = 0;
            AdjustsFontSizeToFitWidth = true;

            BackgroundColor = UIColor.Clear;
        }
 public MDRadialProgressView(RectangleF frame, MDRadialProgressTheme theme)
     : base(frame)
 {
     InternalInitWithTheme(theme);
 }
        void InternalInitWithTheme(MDRadialProgressTheme theme)
        {
            ProgressTotal = 1;
            ProgressCounter = 0;
            StartingSlice = 1;
            Clockwise = true;

            Theme = theme;

            Label = new MDRadialProgressLabel(Bounds, Theme);
            Add(Label);

            internalPadding = 2;
            IsAccessibilityElement = true;

            // TODO extract to i18n
            AccessibilityLabel = "Progress".t();

            BackgroundColor = UIColor.Clear;

            //            AddObserver(Label, MDRadialProgressLabel.KeyThickness, NSKeyValueObservingOptions.New, IntPtr.Zero);
        }