summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeungkeun Lee <sngn.lee@samsung.com>2017-09-20 04:00:54 (GMT)
committerKangho Hur <kangho.hur@samsung.com>2017-10-23 04:34:42 (GMT)
commitabbd040185369542048ed2dd270047e0ddf540ee (patch)
tree2460c3617b3e7bcd1886f3a5954ea1b6a02eef61
parentab135c4d5aff785e128fc082499a700f931c78d0 (diff)
downloadxamarin-forms-abbd040185369542048ed2dd270047e0ddf540ee.zip
xamarin-forms-abbd040185369542048ed2dd270047e0ddf540ee.tar.gz
xamarin-forms-abbd040185369542048ed2dd270047e0ddf540ee.tar.bz2
Fix ScrollView ScrolledPosition issue
- When Content size was changed, ScrolledPosition was not updated - ScrolledPosition was not convert to DP Change-Id: I747d166a45b34ca41568dbfe98681160c6a75117
-rw-r--r--Xamarin.Forms.Platform.Tizen/Renderers/ScrollViewRenderer.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/ScrollViewRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/ScrollViewRenderer.cs
index 96fb7d9..27914f4 100644
--- a/Xamarin.Forms.Platform.Tizen/Renderers/ScrollViewRenderer.cs
+++ b/Xamarin.Forms.Platform.Tizen/Renderers/ScrollViewRenderer.cs
@@ -123,6 +123,12 @@ namespace Xamarin.Forms.Platform.Tizen
_content.MinimumWidth = Forms.ConvertToScaledPixel(Element.ContentSize.Width);
_content.MinimumHeight = Forms.ConvertToScaledPixel(Element.ContentSize.Height);
+
+ // elm-scroller updates the CurrentRegion after render
+ Device.BeginInvokeOnMainThread(() =>
+ {
+ OnScrolled(Control, EventArgs.Empty);
+ });
}
/// <summary>
@@ -146,7 +152,7 @@ namespace Xamarin.Forms.Platform.Tizen
void OnScrolled(object sender, EventArgs e)
{
- var region = Control.CurrentRegion;
+ var region = Control.CurrentRegion.ToDP();
((IScrollViewController)Element).SetScrolledPosition(region.X, region.Y);
}