public void GenerateStatusView(List <string> elements) { CleanViews(); NSTextField label = null; foreach (var item in elements) { label = GetLabel(item); stackContainer.AddView(label, NSStackViewGravity.Leading); var content = label.GetContentHuggingPriorityForOrientation(NSLayoutConstraintOrientation.Vertical); label.SetContentHuggingPriorityForOrientation(750, NSLayoutConstraintOrientation.Vertical); } if (label != null) { label.SetContentHuggingPriorityForOrientation(300, NSLayoutConstraintOrientation.Vertical); } }