NavigateFrame() public static method

public static NavigateFrame ( Frame frameIfNoMobileMode, Type pageType, object param ) : void
frameIfNoMobileMode Frame
pageType Type
param object
return void
Esempio n. 1
0
        public MainPage()
        {
            this.InitializeComponent();


            //アプリのライフサイクルをフック
            App.Current.Resuming   += Current_Resuming;
            App.Current.Suspending += Current_Suspending;
            App.OnChangeAppState   += (state, prev) =>
            {
                switch (state)
                {
                case AppState.Mobile:
                    VisualStateManager.GoToState(this, "MobileState", false);

                    App.NavigateFrame(frameContent, typeof(MainPage), null);

                    break;

                case AppState.Normal:
                    VisualStateManager.GoToState(this, "NormalState", false);

                    App.RootFrame.Navigate(typeof(MainPage));

                    break;

                case AppState.Wide:
                    VisualStateManager.GoToState(this, "WideState", false);

                    break;
                }
            };
            Messenger.Default.Register <string>("", "error", async(message) =>
            {
                var dialog = new MessageDialog(message, "error");
                await dialog.ShowAsync();
            });
            Messenger.Default.Register <bool>("", "updating", (bol) =>
            {
            });

            this.DataContext = App.ViewModel;
        }
 private void listBox_command_ItemClick(object sender, ItemClickEventArgs e)
 {
     App.NavigateFrame(frameCommand, typeof(CommandPage), e.ClickedItem);
 }