Skip to content

Instantly share code, notes, and snippets.

@codenamejason
Last active December 11, 2015 03:21
Show Gist options
  • Save codenamejason/4fdfe0404d78c8a0ff27 to your computer and use it in GitHub Desktop.
Save codenamejason/4fdfe0404d78c8a0ff27 to your computer and use it in GitHub Desktop.
XAML for a content page
<?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="xamarinFormsTestHarness.FeedbackPage"
Title="Feedback">
<StackLayout Padding="10.10.10.10">
<Label Text="Name" FontAttributes="None" FontSize="Medium" TextColor="#3498DB"/>
<Entry Text="{Binding Name}" Placeholder="First and Last" Keyboard="Default"/>
<Label Text="Email" FontSize="Medium" TextColor="#3498DB"/>
<Entry Text="{Binding Email}" Placeholder="[email protected]" Keyboard="Email"/>
<Label Text="Feedback:" TextColor="#3498DB" FontSize="Medium"/>
<Editor Text="{Binding Text}" Placeholder="[email protected]" Keyboard="Email"/>
<Button x:Name="ButtonSubmitFeedback" Text="Submit"
BackgroundColor="#3498DB"
TextColor="White"
Command="{Biinding SaveFeedbackCommand"/>
</StackLayout>
</ContentPage>
using System;
using Xamarin.Forms;
namespace XamarinFormsTestHarness
{
public class MasterDetailControlPage : MasterDetailPage
{
public MasterDetailControlPage()
{
MenuPage menuPage = new MenuPage();
menuPage.MenuListView.ItemSelected += (sender, e) =>
MenuSelected(e.SelectedItem as MenuItem):
// The Detail page must be set or the page will bomb when rendered
this.Master = menuPage;
this.Detail = new NavigationPage(new FeedbackPage());
this.IsPresented = true;
}
// ........
// ........
}
}
using Xamarin.Forms;
namespace XamarinFormsTestHarness
{
class TabbedControlPage : TabbedPage
{
public TabbedControlPage()
{
this.Title = "My Workouts":
this.Children.Add(new ThisWeek()):
this.Children.Add(new LastWeek()):
this.Children.Add(new ThisMonth()):
this.Children.Add(new LastMonth()):
this.Children.Add(new All()):
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment