navigation page
This commit is contained in:
@@ -24,7 +24,8 @@ namespace XamarinStudy
|
||||
//MainPage = tabbed;
|
||||
//MainPage = new SampleCarouselPage();
|
||||
//MainPage = new SampleFlyoutPage();
|
||||
MainPage = new SampleFlyoutPage2();
|
||||
//MainPage = new SampleFlyoutPage2();
|
||||
MainPage = new NavigationPage(new SampleNavigationPage());
|
||||
}
|
||||
|
||||
protected override void OnStart()
|
||||
|
@@ -0,0 +1,17 @@
|
||||
<?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="XamarinStudy.Views.SampleNavigationPage">
|
||||
<ContentPage.ToolbarItems>
|
||||
<ToolbarItem Text="Modal" Clicked="ToolbarItem_Modal_Clicked"/>
|
||||
<ToolbarItem Text="Non-Modal" Clicked="ToolbarItem_NonModal_Clicked"/>
|
||||
</ContentPage.ToolbarItems>
|
||||
|
||||
<ContentPage.Content>
|
||||
<StackLayout BackgroundColor="BlanchedAlmond">
|
||||
<Label Text="Welcome to Sample Navigation page!"
|
||||
VerticalOptions="CenterAndExpand"
|
||||
HorizontalOptions="CenterAndExpand" />
|
||||
</StackLayout>
|
||||
</ContentPage.Content>
|
||||
</ContentPage>
|
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Xaml;
|
||||
|
||||
namespace XamarinStudy.Views
|
||||
{
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class SampleNavigationPage : ContentPage
|
||||
{
|
||||
public SampleNavigationPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void ToolbarItem_Modal_Clicked(object sender, EventArgs e)
|
||||
{
|
||||
Navigation.PushModalAsync(new SampleContentPage());
|
||||
}
|
||||
|
||||
private void ToolbarItem_NonModal_Clicked(object sender, EventArgs e)
|
||||
{
|
||||
Navigation.PushAsync(new SampleContentPage());
|
||||
}
|
||||
}
|
||||
}
|
@@ -23,6 +23,9 @@
|
||||
<EmbeddedResource Update="Views\SampleFlyoutPageFlyout.xaml">
|
||||
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="Views\SampleNavigationPage.xaml">
|
||||
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="Views\SampleTabPage.xaml">
|
||||
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
||||
</EmbeddedResource>
|
||||
|
Reference in New Issue
Block a user