Skip to content

Instantly share code, notes, and snippets.

@dsplaisted
Last active January 3, 2016 09:08
Show Gist options
  • Save dsplaisted/8440375 to your computer and use it in GitHub Desktop.
Save dsplaisted/8440375 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:local="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:text="Filename"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/textView1" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/textFilename"
local:MvxBind="Text Filename" />
<TextView
android:text="Contents"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/textView3" />
<EditText
android:inputType="textMultiLine"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/textContents"
local:MvxBind="Text Contents"
android:height="0px"
android:layout_weight="1" />
<LinearLayout
android:orientation="horizontal"
android:minWidth="25px"
android:minHeight="25px"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/linearLayout1">
<Button
android:text="Save"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:id="@+id/SaveButton" />
<Button
android:text="Load"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:id="@+id/LoadButton" />
</LinearLayout>
</LinearLayout>
<views:MvxPhonePage
x:Class="MvvmCrossNotepad.Phone.Views.NotepadView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:views="clr-namespace:Cirrious.MvvmCross.WindowsPhone.Views;assembly=Cirrious.MvvmCross.WindowsPhone"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait" Orientation="Portrait"
mc:Ignorable="d"
shell:SystemTray.IsVisible="True">
<!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="LayoutRoot" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!--TitlePanel contains the name of the application and page title-->
<StackPanel Grid.Row="0" Margin="12,17,0,28">
<TextBlock Text="MY APPLICATION" Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock Text="page name" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
</StackPanel>
<!--ContentPanel - place additional content here-->
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Text="Filename" Margin="12,12,12,12" Style="{StaticResource SubheaderTextStyle}"/>
<TextBox Text="{Binding Filename, Mode=TwoWay}" Grid.Row="1"/>
<TextBlock Text="Contents" Grid.Row="2" Margin="12,12,12,12" Style="{StaticResource SubheaderTextStyle}"/>
<TextBox Text="{Binding Contents, Mode=TwoWay}" Grid.Row="3" AcceptsReturn="True"/>
<StackPanel Orientation="Horizontal" Grid.Row="4">
<Button Content="Save" Command="{Binding SaveCommand}"/>
<Button Content="Load" Command="{Binding LoadCommand}"/>
</StackPanel>
</Grid>
</Grid>
</views:MvxPhonePage>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment