public override void ViewDidLoad() { base.ViewDidLoad(); View.BackgroundColor = UIColor.White; ExtendedLayoutIncludesOpaqueBars = false; EdgesForExtendedLayout = UIRectEdge.None; var imageView = new ImageView(); imageView.TranslatesAutoresizingMaskIntoConstraints = false; imageView.SetContentCompressionResistancePriority((float)UILayoutPriority.DefaultLow, UILayoutConstraintAxis.Vertical); imageView.SetContentCompressionResistancePriority((float)UILayoutPriority.DefaultLow, UILayoutConstraintAxis.Horizontal); var titleView = new TitleView(); titleView.TranslatesAutoresizingMaskIntoConstraints = false; titleView.Title = viewModel.Title; titleView.SetContentCompressionResistancePriority((float)UILayoutPriority.Required, UILayoutConstraintAxis.Vertical); titleView.SetContentCompressionResistancePriority((float)UILayoutPriority.Required, UILayoutConstraintAxis.Horizontal); var attributesView = new AttributesView(); attributesView.TranslatesAutoresizingMaskIntoConstraints = false; attributesView.NumberOfAttributes = viewModel.NumberOfAttributes; attributesView.SetContentCompressionResistancePriority((float)UILayoutPriority.Required, UILayoutConstraintAxis.Vertical); attributesView.SetContentCompressionResistancePriority((float)UILayoutPriority.Required, UILayoutConstraintAxis.Horizontal); for (int i = 0; i < attributesView.AttributesNamesColumn.Labels.Count; i++) { var attributeViewModel = viewModel.Atrribute(i); attributesView.AttributesNamesColumn.Labels[i].Text = attributeViewModel.AttributeName; } for (int i = 0; i < attributesView.AttributesValuesColumn.Labels.Count; i++) { var attributeViewModel = viewModel.Atrribute(i); attributesView.AttributesNamesColumn.Labels[i].Text = attributeViewModel.AttributeValue; } stackView.AddArrangedSubview(imageView); stackView.AddArrangedSubview(titleView); stackView.AddArrangedSubview(attributesView); stackView.Axis = UILayoutConstraintAxis.Vertical; stackView.Distribution = UIStackViewDistribution.Fill; stackView.TranslatesAutoresizingMaskIntoConstraints = false; View.AddSubview(scrollView); scrollView.TranslatesAutoresizingMaskIntoConstraints = false; scrollView.AlwaysBounceVertical = true; scrollView.AddSubview(stackView); stackView.TopAnchor.ConstraintEqualTo(scrollView.TopAnchor).Active = true; stackView.HeightAnchor.ConstraintEqualTo(View.HeightAnchor).Active = true; stackView.WidthAnchor.ConstraintEqualTo(View.WidthAnchor).Active = true; this.SetActiveNavigationItemTitle(viewModel.Title); View.SetNeedsLayout(); View.LayoutIfNeeded(); imageView.CustomImage = viewModel.ThumbnailImage(new CGSize(imageView.Bounds.Width, imageView.Bounds.Height)); }