sample tool bar

main
Peace 2 years ago
parent 6c901a5b03
commit 48cd09a162
  1. 3
      XamarinStudy/XamarinStudy/XamarinStudy/App.xaml.cs
  2. 16
      XamarinStudy/XamarinStudy/XamarinStudy/Views/SampleToolbarPage.xaml
  3. 20
      XamarinStudy/XamarinStudy/XamarinStudy/Views/SampleToolbarPage.xaml.cs
  4. 5
      XamarinStudy/XamarinStudy/XamarinStudy/XamarinStudy.csproj

@ -15,7 +15,8 @@ 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());
} }
protected override void OnStart() protected override void OnStart()

@ -0,0 +1,16 @@
<?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.SampleToolbarPage">
<ContentPage.ToolbarItems>
<ToolbarItem Text="Add"/>
<ToolbarItem Text="Delete"/>
</ContentPage.ToolbarItems>
<ContentPage.Content>
<StackLayout>
<Label Text="Welcome to Xamarin.Forms!"
VerticalOptions="CenterAndExpand"
HorizontalOptions="CenterAndExpand" />
</StackLayout>
</ContentPage.Content>
</ContentPage>

@ -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 SampleToolbarPage : ContentPage
{
public SampleToolbarPage()
{
InitializeComponent();
}
}
}

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework> <TargetFramework>netstandard2.0</TargetFramework>
@ -14,5 +14,8 @@
<EmbeddedResource Update="Views\SampleContentPage.xaml"> <EmbeddedResource Update="Views\SampleContentPage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator> <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Update="Views\SampleToolbarPage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
</ItemGroup> </ItemGroup>
</Project> </Project>
Loading…
Cancel
Save