Created
February 14, 2017 12:50
-
-
Save VelizarHristov/9ee3a788fdd86d537c32803f4973711d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace CheapIroning | |
open Xamarin.Forms | |
type App() as thisG = | |
// this works: | |
// inherit Application(NavigationPage(UnauthPage(fun () -> this.changeToLoggedIn |> ignore))) | |
// but afterwards, calling the passed function crashes the app | |
inherit Application() | |
do | |
// this block of code is executed | |
// however, on startup, no page is displayed | |
// passing thisG.page1 doesn't change the outcome | |
thisG.MainPage = thisG.page2 | |
() | |
member this.changeToLoggedIn = | |
this.MainPage = upcast NavigationPage(CheapIroningPage()) | |
member this.page1 = | |
NavigationPage(CheapIroningPage()) :> Page | |
member this.page2 = | |
NavigationPage(UnauthPage(fun () -> this.changeToLoggedIn |> ignore)) :> Page |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment