protected virtual void CreateItems() { var vm = ((ITotalScoreItemVm)this.DataContext); for (var i = 1; i <= vm.MaxValue; i++) { var scoreItemView = new UIView(frame: new CGRect(0, 0, ScoreView.Frame.Height, ScoreView.Frame.Height)); scoreItemView.Tag = i; scoreItemView.BackgroundColor = ThemeConfig.ReviewPost.Score.BackgroundColor.ToUIColor(); scoreItemView.Layer.CornerRadius = scoreItemView.Frame.Height / 2; scoreItemView.ActionOnTap(() => { SelectView(scoreItemView); }); ScoreView.AddSubview(scoreItemView); var scoreItemLabel = new AppRopio.Base.iOS.Controls.ARLabel(frame: scoreItemView.Bounds); scoreItemLabel.Text = i.ToString(); scoreItemLabel.TextAlignment = UITextAlignment.Center; scoreItemLabel.SetupStyle(ThemeConfig.ReviewPost.ScoreValue); scoreItemView.AddSubview(scoreItemLabel); if (i == vm.Value) { SelectView(scoreItemView); } } }