以下の内容はhttps://shuhelohelo.hatenablog.com/entry/2020/06/03/175128より取得しました。


Xamarin.Forms: Shellを使う場合のログインFlow

mallibone.com

Shellは先頭のShellContentがデフォルトで表示されることを利用し,ローディングページ(LoadingPage)をShellContentとして先頭に置いている.

LoadingPageはLoadingPage.xaml.csで以下のように初期化処理を行っている.

        internal LoadingViewModel ViewModel { get; set; } = Locator.Current.GetService<LoadingViewModel>();

        protected override void OnAppearing()
        {
            base.OnAppearing();
            ViewModel.Init();
    }

この初期化処理の中で次の画面への遷移が行われる.

すべてShellの中で行う.なるほどね.

自分がやった方法

スプラッシュ,ログイン,登録画面はShellの中に入れなかった.

ログイン後にShellに遷移する形式.

うーん,どっちがいいかなぁ.

ソースコード

github.com




以上の内容はhttps://shuhelohelo.hatenablog.com/entry/2020/06/03/175128より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14