Label size doesn't change when text changed (#7942)
authorbill2004158 <bill2004158@gmail.com>
Tue, 15 Oct 2019 10:53:31 +0000 (18:53 +0800)
committerStephane Delcroix <stephane@delcroix.org>
Tue, 15 Oct 2019 10:53:31 +0000 (12:53 +0200)
- fixes #7888

Xamarin.Forms.Platform.iOS/Renderers/LabelRenderer.cs

index 63521fc..88cf64a 100644 (file)
@@ -155,9 +155,9 @@ namespace Xamarin.Forms.Platform.MacOS
 
                        if (e.NewElement != null)
                        {
+                               e.NewElement.PropertyChanging += ElementPropertyChanging;
                                if (Control == null)
                                {
-                                       e.NewElement.PropertyChanging += ElementPropertyChanging;
                                        SetNativeControl(CreateNativeControl());
 #if !__MOBILE__
                                        Control.Editable = false;