@@ -76,37 +76,37 @@ protected BaseRectangleEditorControl (IHostResourceProvider hostResources)
7676 AddSubview ( HeightEditor ) ;
7777
7878 this . AddConstraints ( new [ ] {
79- NSLayoutConstraint . Create ( XEditor , NSLayoutAttribute . Top , NSLayoutRelation . Equal , this , NSLayoutAttribute . Top , 1f , 0f ) ,
79+ NSLayoutConstraint . Create ( XEditor , NSLayoutAttribute . Top , NSLayoutRelation . Equal , this , NSLayoutAttribute . Top , 1f , 3f ) ,
8080 NSLayoutConstraint . Create ( XEditor , NSLayoutAttribute . Left , NSLayoutRelation . Equal , this , NSLayoutAttribute . Left , 1f , 0f ) ,
8181 NSLayoutConstraint . Create ( XEditor , NSLayoutAttribute . Right , NSLayoutRelation . Equal , YEditor , NSLayoutAttribute . Left , 1f , - 10f ) ,
82- NSLayoutConstraint . Create ( XEditor , NSLayoutAttribute . Height , NSLayoutRelation . Equal , 1f , DefaultControlHeight ) ,
82+ NSLayoutConstraint . Create ( XEditor , NSLayoutAttribute . Height , NSLayoutRelation . Equal , 1f , 18 ) ,
8383
8484 NSLayoutConstraint . Create ( XLabel , NSLayoutAttribute . Top , NSLayoutRelation . Equal , XEditor , NSLayoutAttribute . Bottom , 1f , - 4f ) ,
85- NSLayoutConstraint . Create ( XLabel , NSLayoutAttribute . Height , NSLayoutRelation . Equal , 1f , DefaultControlHeight ) ,
85+ NSLayoutConstraint . Create ( XLabel , NSLayoutAttribute . Height , NSLayoutRelation . Equal , 1f , 18 ) ,
8686
87- NSLayoutConstraint . Create ( YEditor , NSLayoutAttribute . Top , NSLayoutRelation . Equal , this , NSLayoutAttribute . Top , 1f , 0f ) ,
88- NSLayoutConstraint . Create ( YEditor , NSLayoutAttribute . Right , NSLayoutRelation . Equal , this , NSLayoutAttribute . Right , 1f , - 32f ) ,
87+ NSLayoutConstraint . Create ( YEditor , NSLayoutAttribute . Top , NSLayoutRelation . Equal , this , NSLayoutAttribute . Top , 1f , 3f ) ,
88+ NSLayoutConstraint . Create ( YEditor , NSLayoutAttribute . Right , NSLayoutRelation . Equal , this , NSLayoutAttribute . Right , 1f , 0 ) ,
8989 NSLayoutConstraint . Create ( YEditor , NSLayoutAttribute . Width , NSLayoutRelation . Equal , XEditor , NSLayoutAttribute . Width , 1f , 0f ) ,
90- NSLayoutConstraint . Create ( YEditor , NSLayoutAttribute . Height , NSLayoutRelation . Equal , 1f , DefaultControlHeight ) ,
90+ NSLayoutConstraint . Create ( YEditor , NSLayoutAttribute . Height , NSLayoutRelation . Equal , 1f , 18 ) ,
9191
9292 NSLayoutConstraint . Create ( YLabel , NSLayoutAttribute . Top , NSLayoutRelation . Equal , XLabel , NSLayoutAttribute . Top , 1f , 0f ) ,
93- NSLayoutConstraint . Create ( YLabel , NSLayoutAttribute . Height , NSLayoutRelation . Equal , 1f , DefaultControlHeight ) ,
93+ NSLayoutConstraint . Create ( YLabel , NSLayoutAttribute . Height , NSLayoutRelation . Equal , 1f , 18 ) ,
9494
9595 NSLayoutConstraint . Create ( WidthEditor , NSLayoutAttribute . Top , NSLayoutRelation . Equal , this , NSLayoutAttribute . Top , 1f , 33f ) ,
9696 NSLayoutConstraint . Create ( WidthEditor , NSLayoutAttribute . Left , NSLayoutRelation . Equal , this , NSLayoutAttribute . Left , 1f , 0f ) ,
9797 NSLayoutConstraint . Create ( WidthEditor , NSLayoutAttribute . Right , NSLayoutRelation . Equal , HeightEditor , NSLayoutAttribute . Left , 1f , - 10f ) ,
98- NSLayoutConstraint . Create ( WidthEditor , NSLayoutAttribute . Height , NSLayoutRelation . Equal , 1f , DefaultControlHeight ) ,
98+ NSLayoutConstraint . Create ( WidthEditor , NSLayoutAttribute . Height , NSLayoutRelation . Equal , 1f , 18 ) ,
9999
100100 NSLayoutConstraint . Create ( WidthLabel , NSLayoutAttribute . Top , NSLayoutRelation . Equal , WidthEditor , NSLayoutAttribute . Bottom , 1f , - 4f ) ,
101- NSLayoutConstraint . Create ( WidthLabel , NSLayoutAttribute . Height , NSLayoutRelation . Equal , 1f , DefaultControlHeight ) ,
101+ NSLayoutConstraint . Create ( WidthLabel , NSLayoutAttribute . Height , NSLayoutRelation . Equal , 1f , 18 ) ,
102102
103103 NSLayoutConstraint . Create ( HeightEditor , NSLayoutAttribute . Top , NSLayoutRelation . Equal , WidthEditor , NSLayoutAttribute . Top , 1f , 0f ) ,
104- NSLayoutConstraint . Create ( HeightEditor , NSLayoutAttribute . Right , NSLayoutRelation . Equal , this , NSLayoutAttribute . Right , 1f , - 32f ) ,
104+ NSLayoutConstraint . Create ( HeightEditor , NSLayoutAttribute . Right , NSLayoutRelation . Equal , this , NSLayoutAttribute . Right , 1f , 0 ) ,
105105 NSLayoutConstraint . Create ( HeightEditor , NSLayoutAttribute . Width , NSLayoutRelation . Equal , WidthEditor , NSLayoutAttribute . Width , 1f , 0f ) ,
106- NSLayoutConstraint . Create ( HeightEditor , NSLayoutAttribute . Height , NSLayoutRelation . Equal , 1f , DefaultControlHeight ) ,
106+ NSLayoutConstraint . Create ( HeightEditor , NSLayoutAttribute . Height , NSLayoutRelation . Equal , 1f , 18 ) ,
107107
108108 NSLayoutConstraint . Create ( HeightLabel , NSLayoutAttribute . Top , NSLayoutRelation . Equal , WidthLabel , NSLayoutAttribute . Top , 1f , 0f ) ,
109- NSLayoutConstraint . Create ( HeightLabel , NSLayoutAttribute . Height , NSLayoutRelation . Equal , 1f , DefaultControlHeight ) ,
109+ NSLayoutConstraint . Create ( HeightLabel , NSLayoutAttribute . Height , NSLayoutRelation . Equal , 1f , 18 ) ,
110110
111111
112112 NSLayoutConstraint . Create ( XLabel , NSLayoutAttribute . CenterX , NSLayoutRelation . Equal , XEditor . Subviews [ 0 ] , NSLayoutAttribute . CenterX , 1f , 0 ) ,
@@ -133,21 +133,6 @@ protected virtual void OnInputUpdated (object sender, EventArgs e)
133133 ViewModel . Value = ( T ) Activator . CreateInstance ( typeof ( T ) , XEditor . Value , YEditor . Value , WidthEditor . Value , HeightEditor . Value ) ;
134134 }
135135
136- protected override void HandleErrorsChanged ( object sender , System . ComponentModel . DataErrorsChangedEventArgs e )
137- {
138- UpdateErrorsDisplayed ( ViewModel . GetErrors ( ViewModel . Property . Name ) ) ;
139- }
140-
141- protected override void UpdateErrorsDisplayed ( IEnumerable errors )
142- {
143- if ( ViewModel . HasErrors ) {
144- SetErrors ( errors ) ;
145- } else {
146- SetErrors ( null ) ;
147- SetEnabled ( ) ;
148- }
149- }
150-
151136 protected override void SetEnabled ( )
152137 {
153138 XEditor . Enabled = ViewModel . Property . CanWrite ;
0 commit comments