diff options
author | Dominique Louis <dominique@yen-x1-31.fareast.corp.microsoft.com> | 2018-12-02 11:36:19 +0300 |
---|---|---|
committer | Dominique Louis <dominique@yen-x1-31.fareast.corp.microsoft.com> | 2018-12-02 11:52:09 +0300 |
commit | 2f16fd1451e3e7c9adcca9fe852fe767834468be (patch) | |
tree | 071efa534ea30fa170ea1201bde9c01f053ad496 /Xamarin.PropertyEditing.Mac/Controls/NumericEditorControl.cs | |
parent | 794123986062cb0a8ab2885bbb449bb62f9f13ad (diff) |
[Mac] Remove DoConstraints dependency and use NSLayoutConstraint.Create calls directly. Should be slightly faster on startup.
Diffstat (limited to 'Xamarin.PropertyEditing.Mac/Controls/NumericEditorControl.cs')
-rw-r--r-- | Xamarin.PropertyEditing.Mac/Controls/NumericEditorControl.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Xamarin.PropertyEditing.Mac/Controls/NumericEditorControl.cs b/Xamarin.PropertyEditing.Mac/Controls/NumericEditorControl.cs index 337cdf9..84a5206 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/NumericEditorControl.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/NumericEditorControl.cs @@ -38,9 +38,9 @@ namespace Xamarin.PropertyEditing.Mac AddSubview (NumericEditor); - this.DoConstraints ( new[] { - NumericEditor.ConstraintTo (this, (n, c) => n.Top == c.Top + 1), - NumericEditor.ConstraintTo (this, (n, c) => n.Width == c.Width - 32), + this.AddConstraints (new[] { + NSLayoutConstraint.Create (NumericEditor, NSLayoutAttribute.Top, NSLayoutRelation.Equal, this, NSLayoutAttribute.Top, 1f, 1f), + NSLayoutConstraint.Create (NumericEditor, NSLayoutAttribute.Width, NSLayoutRelation.Equal, this, NSLayoutAttribute.Width, 1f, -32f), }); } |