Skip to content

Instantly share code, notes, and snippets.

@VelizarHristov
Created February 14, 2017 12:50
Show Gist options
  • Save VelizarHristov/9ee3a788fdd86d537c32803f4973711d to your computer and use it in GitHub Desktop.
Save VelizarHristov/9ee3a788fdd86d537c32803f4973711d to your computer and use it in GitHub Desktop.
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