タブナビゲーションとページを使用して新しいページを開きたいとします。ナビゲーションのこのタイプは、すでにかなりうまく機能して良さそうに見えますタブナビゲーションを使用して新しいページを開く
public RootPage()
{
NavigationPage.SetHasNavigationBar(this, false);
Children.Add(new TestPage1
{
Title = "TestPage1"
});
Children.Add(new TestPage2
{
Title = "TestPage2"
});
Children.Add(new TestPage3
{
Title = "TestPage3"
});
}
:私はナビゲーションを埋めるRootPageで
public App()
{
InitializeComponent();
MainPage = new NavigationPage(new RootPage());
}
:私のapp.xaml.csで
私は、ナビゲーション・ページを作成します。 は、今私はTestPage3内の新しいページを開きたい: TestPage3.xaml:
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="DemoApplication.TestPage3">
<Button x:Name="openSetup" Clicked="ItemClicked" Text="open Settings"/>
</ContentPage>
TestPage3.xaml.cs:
namespace DemoApplication
{
public partial class TestPage3 : ContentPage
{
public TestPage3()
{
InitializeComponent();
}
void ItemClicked(object sender, EventArgs e)
{
Navigation.PushAsync(new TestPage4());
}
}
}
また、これは動作しますが、素敵に見えるdoesntの。 Soundcloudのような他のアプリでそうPage4の内容は、周りのジャンプの一種である:)
彼らは同じことを行うが、それは見えます -
元のタブナビゲーションの下に新しいコンテンツをロードし、それがロードされています後にタブナビゲーションが消えよりスムーズな方法。
バックナビゲーション間のタブナビゲーションをより円滑にするのが好きな方法はありますか?あなたは、タブ内を移動したい場合はあなたの助けを
感謝:)