Skip to content

Commit

Permalink
Update the app to use XAML because...XAML
Browse files Browse the repository at this point in the history
  • Loading branch information
jwood803 committed Sep 19, 2015
1 parent e0bfdbb commit d493814
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 15 deletions.
16 changes: 1 addition & 15 deletions FakeDemo/App.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,7 @@ public class App : Application
public App()
{
// The root page of your application
MainPage = new ContentPage
{
Content = new StackLayout
{
VerticalOptions = LayoutOptions.Center,
Children =
{
new Label
{
XAlign = TextAlignment.Center,
Text = "Welcome to Xamarin Forms!"
}
}
}
};
MainPage = new MainPage();
}

protected override void OnStart()
Expand Down
8 changes: 8 additions & 0 deletions FakeDemo/FakeDemo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="App.cs" />
<Compile Include="MainPage.xaml.cs">
<DependentUpon>MainPage.xaml</DependentUpon>
</Compile>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
<Import Project="packages\Xamarin.Forms.1.5.0.6446\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets" Condition="Exists('packages\Xamarin.Forms.1.5.0.6446\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" />
Expand All @@ -49,4 +52,9 @@
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="MainPage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
</ItemGroup>
</Project>
8 changes: 8 additions & 0 deletions FakeDemo/MainPage.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?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="FakeDemo.MainPage">

<Label Text="Built using FAKE!" HorizontalOptions="Center" VerticalOptions="Center" />
</ContentPage>
12 changes: 12 additions & 0 deletions FakeDemo/MainPage.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using Xamarin.Forms;

namespace FakeDemo
{
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
}
}
}

0 comments on commit d493814

Please sign in to comment.