Change Text HorizontalTextAlignment of TitleBar to Center
authorSeungkeun Lee <sngn.lee@samsung.com>
Wed, 21 Dec 2016 04:53:55 +0000 (13:53 +0900)
committerKangho Hur <kangho.hur@samsung.com>
Fri, 24 Mar 2017 04:18:57 +0000 (13:18 +0900)
 - Left alignmented text was side effect of Span
 - In Tizen, it was originally center alignment

Change-Id: I6daebf987d614731bfa35ec1f0cc52398550c140

Xamarin.Forms.Platform.Tizen/Renderers/NavigationPageRenderer.cs

index 0d2ee2e..e760489 100644 (file)
@@ -179,11 +179,13 @@ namespace Xamarin.Forms.Platform.Tizen
 
                string SpanTitle(string Title)
                {
-                       Native.Span span = new Native.Span { Text = Title };
-                       if (Element.BarTextColor != Color.Default)
+                       Native.Span span = new Native.Span
                        {
-                               span.ForegroundColor = Element.BarTextColor.ToNative();
-                       }
+                               Text = Title,
+                               HorizontalTextAlignment = Native.TextAlignment.Center,
+                               ForegroundColor = Element.BarTextColor.ToNative()
+                       };
+
                        //TODO: changes only background of title not all bar
                        if (Element.BarBackgroundColor != Color.Default)
                        {