tab page, carouselPage

main
syneffort 2 years ago
parent 48cd09a162
commit cd50b20538
  1. 8
      XamarinStudy/XamarinStudy/XamarinStudy/App.xaml.cs
  2. 18
      XamarinStudy/XamarinStudy/XamarinStudy/Views/SampleCarouselPage.cs
  3. 9
      XamarinStudy/XamarinStudy/XamarinStudy/Views/SampleTabPage.xaml
  4. 20
      XamarinStudy/XamarinStudy/XamarinStudy/Views/SampleTabPage.xaml.cs
  5. 3
      XamarinStudy/XamarinStudy/XamarinStudy/XamarinStudy.csproj

@ -16,7 +16,13 @@ namespace XamarinStudy
DependencyService.Register<MockDataStore>(); DependencyService.Register<MockDataStore>();
//MainPage = new AppShell(); //MainPage = new AppShell();
//MainPage = new SampleContentPage(); //MainPage = new SampleContentPage();
MainPage = new NavigationPage(new SampleToolbarPage()); //MainPage = new NavigationPage(new SampleToolbarPage());
//MainPage = new SampleTabPage();
//TabbedPage tabbed = new TabbedPage();
//tabbed.Children.Add(new SampleContentPage() { Title = "Page1" });
//tabbed.Children.Add(new SampleToolbarPage() { Title = "Page2" });
//MainPage = tabbed;
MainPage = new SampleCarouselPage();
} }
protected override void OnStart() protected override void OnStart()

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Xamarin.Forms;
namespace XamarinStudy.Views
{
public class SampleCarouselPage : CarouselPage
{
public SampleCarouselPage()
{
Children.Add(new SampleContentPage());
Children.Add(new SampleToolbarPage());
}
}
}

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="XamarinStudy.Views.SampleTabPage">
<!--Pages can be added as references or inline-->
<ContentPage Title="Tab 11" />
<ContentPage Title="Tab 22" />
<ContentPage Title="Tab 33" />
</TabbedPage>

@ -0,0 +1,20 @@
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 SampleTabPage : TabbedPage
{
public SampleTabPage()
{
InitializeComponent();
}
}
}

@ -14,6 +14,9 @@
<EmbeddedResource Update="Views\SampleContentPage.xaml"> <EmbeddedResource Update="Views\SampleContentPage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator> <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Update="Views\SampleTabPage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Views\SampleToolbarPage.xaml"> <EmbeddedResource Update="Views\SampleToolbarPage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator> <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource> </EmbeddedResource>

Loading…
Cancel
Save