public ProgressWidget(int dotCount) : base() { this._imageViews = new UIImageView[dotCount]; ExceptionUtility.Try(() => { for (int n = 0; n < this._imageViews.Length; n++) { this._imageViews[n] = new UIImageView(GraphicsUtility.CreateColoredCircle(Colors.StandardTextColor, DotSize)); this._imageViews[n].ContentMode = UIViewContentMode.Center; this._imageViews[n].MakeRoundedCorners(UIRectCorner.AllCorners, DotSize / 2); this.SetNormalDotState(this._imageViews[n]); this.AddSubview(this._imageViews[n]); this.SetNormalDotState(this._imageViews[n]); } this._animationTimer.Elapsed += (sender, e) => { if (this._animationRunning) { this._animationTimer.Enabled = false; MainThreadUtility.InvokeOnMain(() => { this._currentDotIndex = 0; this.AnimateDotLarge(); }); } }; this._animationTimer.Interval = 2000; }); }