From 2f16fd1451e3e7c9adcca9fe852fe767834468be Mon Sep 17 00:00:00 2001 From: Dominique Louis Date: Sun, 2 Dec 2018 09:36:19 +0100 Subject: [Mac] Remove DoConstraints dependency and use NSLayoutConstraint.Create calls directly. Should be slightly faster on startup. --- .../Controls/RequestResource/RequestResourcePanel.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Xamarin.PropertyEditing.Mac/Controls/RequestResource') diff --git a/Xamarin.PropertyEditing.Mac/Controls/RequestResource/RequestResourcePanel.cs b/Xamarin.PropertyEditing.Mac/Controls/RequestResource/RequestResourcePanel.cs index 394dec8..4907d2a 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/RequestResource/RequestResourcePanel.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/RequestResource/RequestResourcePanel.cs @@ -118,9 +118,9 @@ namespace Xamarin.PropertyEditing.Mac this.previewPanel = new RequestResourcePreviewPanel (new CGRect (Frame.Width - FrameWidthThird, 0, FrameWidthThird, Frame.Height)); AddSubview (this.previewPanel); - this.DoConstraints (new NSLayoutConstraint[] { - this.tableContainer.ConstraintTo (this, (t, c) => t.Width == c.Width - 190), - this.tableContainer.ConstraintTo (this, (t, c) => t.Height == c.Height), + this.AddConstraints (new[] { + NSLayoutConstraint.Create (this.tableContainer, NSLayoutAttribute.Width, NSLayoutRelation.Equal, this, NSLayoutAttribute.Width, 1f, -190f), + NSLayoutConstraint.Create (this.tableContainer, NSLayoutAttribute.Height, NSLayoutRelation.Equal, this, NSLayoutAttribute.Height, 1f, 0f), }); ReloadData (); -- cgit v1.2.3