From c3e7765616b71fc3cb65db914fd6e0bf6db786a3 Mon Sep 17 00:00:00 2001 From: Kangho Hur Date: Thu, 19 Jan 2017 09:22:48 +0900 Subject: Apply to default layout for the forms application Change-Id: Ieb55d1b2f1a3deb29db9a7ccc8c3009d7553ed2e --- Xamarin.Forms.Platform.Tizen/Native/Window.cs | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/Xamarin.Forms.Platform.Tizen/Native/Window.cs b/Xamarin.Forms.Platform.Tizen/Native/Window.cs index 87a54cd3..7587e17c 100644 --- a/Xamarin.Forms.Platform.Tizen/Native/Window.cs +++ b/Xamarin.Forms.Platform.Tizen/Native/Window.cs @@ -1,11 +1,13 @@ using System; using ElmSharp; using EWindow = ElmSharp.Window; +using ELayout = ElmSharp.Layout; namespace Xamarin.Forms.Platform.Tizen.Native { public class Window : EWindow { + ELayout _layout; Conformant _conformant; /// @@ -69,13 +71,26 @@ namespace Xamarin.Forms.Platform.Tizen.Native } } + public ELayout BaseLayout + { + get + { + return _layout; + } + + private set + { + _layout = value; + } + } + /// /// Sets the main page of Window. /// /// ElmSharp.EvasObject type page to be set. public void SetMainPage(EvasObject content) { - _conformant.SetContent(content); + _layout.SetContent(content); } void Initialize() @@ -112,6 +127,15 @@ namespace Xamarin.Forms.Platform.Tizen.Native _conformant.SetWeight(1.0, 1.0); // expand _conformant.Show(); + // Create the base (default) layout for the application + _layout = new ELayout(_conformant); + _layout.SetAlignment(-1.0, -1.0); // fill + _layout.SetWeight(1.0, 1.0); // expand + _layout.SetTheme("layout", "application", "default"); + _layout.Show(); + + _conformant.SetContent(_layout); + BaseLayout = _layout; AvailableOrientations = DisplayOrientations.Portrait | DisplayOrientations.Landscape | DisplayOrientations.PortraitFlipped | DisplayOrientations.LandscapeFlipped; } DisplayOrientations GetDisplayOrientation() -- cgit v1.2.3