summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeungkeun Lee <sngn.lee@samsung.com>2017-08-01 01:36:00 (GMT)
committerKangho Hur <kangho.hur@samsung.com>2017-10-23 04:34:39 (GMT)
commit2f6232a5c97b7b29915c529e30957b3e0118a580 (patch)
treeeca01ff67b98380baa8a7782a1b5bdc571d55d5a
parent8bb9457af7bf13e7a172aad87544f64d794301bd (diff)
downloadxamarin-forms-2f6232a5c97b7b29915c529e30957b3e0118a580.zip
xamarin-forms-2f6232a5c97b7b29915c529e30957b3e0118a580.tar.gz
xamarin-forms-2f6232a5c97b7b29915c529e30957b3e0118a580.tar.bz2
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 5b0fd34..8111a83 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 d5de949..88ae9ba 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();
}