summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeungkeun Lee <sngn.lee@samsung.com>2017-08-01 10:36:00 +0900
committerKangho Hur <kangho.hur@samsung.com>2017-10-23 13:34:39 +0900
commit2f6232a5c97b7b29915c529e30957b3e0118a580 (patch)
treeeca01ff67b98380baa8a7782a1b5bdc571d55d5a
parent8bb9457af7bf13e7a172aad87544f64d794301bd (diff)
downloadxamarin-forms-2f6232a5c97b7b29915c529e30957b3e0118a580.tar.gz
xamarin-forms-2f6232a5c97b7b29915c529e30957b3e0118a580.tar.bz2
xamarin-forms-2f6232a5c97b7b29915c529e30957b3e0118a580.zip
Fix Parent renderer issue
- In many cases, parent renderer was required in our renderer implementation - The previous Platform.SetRenderer has caused the start of layouting - This is because IsPlatformEnabled has enabled automatically when renderer was set - So now, I separate it Change-Id: Ie590f3406c26591bb1794f368ddb991af5e6ca11
-rw-r--r--Xamarin.Forms.Platform.Tizen/Platform.cs6
-rw-r--r--Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs8
2 files changed, 9 insertions, 5 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Platform.cs b/Xamarin.Forms.Platform.Tizen/Platform.cs
index 5b0fd349..8111a832 100644
--- a/Xamarin.Forms.Platform.Tizen/Platform.cs
+++ b/Xamarin.Forms.Platform.Tizen/Platform.cs
@@ -13,8 +13,8 @@ namespace Xamarin.Forms.Platform.Tizen
propertyChanged: (bindable, oldvalue, newvalue) =>
{
var ve = bindable as VisualElement;
- if (ve != null)
- ve.IsPlatformEnabled = newvalue != null;
+ if (ve != null && newvalue == null)
+ ve.IsPlatformEnabled = false;
});
Naviframe _naviframe;
@@ -339,4 +339,4 @@ namespace Xamarin.Forms.Platform.Tizen
tcs?.SetResult(true);
}
}
-} \ No newline at end of file
+}
diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs
index d5de949b..88ae9ba6 100644
--- a/Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs
+++ b/Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs
@@ -188,6 +188,10 @@ namespace Xamarin.Forms.Platform.Tizen
// send notification
OnElementChanged(new ElementChangedEventArgs<TElement>(oldElement, newElement));
+
+ // store renderer for the new element
+ Platform.SetRenderer(newElement, this);
+
// add children
var logicalChildren = (newElement as IElementController).LogicalChildren;
foreach (Element child in logicalChildren)
@@ -195,8 +199,8 @@ namespace Xamarin.Forms.Platform.Tizen
AddChild(child);
}
- // store renderer for the new element
- Platform.SetRenderer(newElement, this);
+ newElement.IsPlatformEnabled = true;
+
OnElementReady();
}