tab page, carouselPage

This commit is contained in:
2023-01-09 18:16:19 +09:00
parent 48cd09a162
commit cd50b20538
5 changed files with 57 additions and 1 deletions

View File

@@ -16,7 +16,13 @@ namespace XamarinStudy
DependencyService.Register<MockDataStore>();
//MainPage = new AppShell();
//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()

View File

@@ -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());
}
}
}

View File

@@ -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>

View File

@@ -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();
}
}
}

View File

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