Create Window in OnPreCreate() instead of OnCreate()
authorWonYoung Choi <wy80.choi@samsung.com>
Mon, 27 Feb 2017 13:23:22 +0000 (22:23 +0900)
committerKangho Hur <kangho.hur@samsung.com>
Mon, 10 Jul 2017 02:11:19 +0000 (11:11 +0900)
OnPreCreate() method is called before OnCreate() always. If the Window
is created in OnPreCreate(), User doesn't have to consider the call
sequence of base.OnCreate() and LoadApplication() methods. Because
the Window will be prepared before OnCreate() is called.

Change-Id: I4c9f1e9507acc00850848274309409e884573e59

Xamarin.Forms.Platform.Tizen/FormsApplication.cs [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index 806f6a8..57efa3f
@@ -41,9 +41,9 @@ namespace Xamarin.Forms.Platform.Tizen
                        }
                }
 
-               protected override void OnCreate()
+               protected override void OnPreCreate()
                {
-                       base.OnCreate();
+                       base.OnPreCreate();
                        Application.ClearCurrent();
                        CreateWindow();
                }
@@ -93,7 +93,7 @@ namespace Xamarin.Forms.Platform.Tizen
                {
                        if (null == MainWindow)
                        {
-                               throw new NullReferenceException("Call base OnCreate() method before loading the application.");
+                               throw new NullReferenceException("MainWindow is not prepared. This method should be called in OnCreated().");
                        }
                        if (null == application)
                        {