This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <ContentPage | |
| xmlns="http://xamarin.com/schemas/2014/forms" | |
| xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
| xmlns:local="clr-namespace:HelloForms" | |
| x:Class="HelloForms.HelloFormsPage"> | |
| <Label | |
| Text="Hello Xamarin.Forms" | |
| VerticalOptions="Center" | |
| HorizontalOptions="Center" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Xamarin.Forms; | |
| namespace HelloForms { | |
| public partial class App : Application { | |
| public App() { | |
| InitializeComponent(); | |
| MainPage = new HelloFormsPage(); | |
| } | |
| protected override void OnStart() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using Android.App; | |
| using Android.Content; | |
| using Android.Content.PM; | |
| using Android.Runtime; | |
| using Android.Views; | |
| using Android.Widget; | |
| using Android.OS; | |
| namespace HelloForms.Droid { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using Foundation; | |
| using UIKit; | |
| namespace HelloForms.iOS { | |
| [Register("AppDelegate")] | |
| public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using Foundation; | |
| using UIKit; | |
| namespace HelloForms.iOS { | |
| public class Application { | |
| // This is the main entry point of the application. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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="MyProjectName.CustomContentPage" ControlTemplate="{StaticResource MainPageTemplate}"> | |
| <ContentPage.Padding> | |
| <OnPlatform x:TypeArguments="Thickness" iOS="0, 20, 0, 0" /> | |
| </ContentPage.Padding> | |
| </ContentPage> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <Application xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="MyProjectName.App"> | |
| <Application.Resources> | |
| <!-- Application resource dictionary --> | |
| <ResourceDictionary> | |
| <ControlTemplate x:Key="MainPageTemplate"> | |
| <Grid VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" ColumnSpacing="0"> | |
| <Grid.RowDefinitions> | |
| <RowDefinition Height="50"/> | |
| <RowDefinition Height="*"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <Grid VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" ColumnSpacing="0"> | |
| <Grid.RowDefinitions> | |
| <RowDefinition Height="50"/> | |
| </Grid.RowDefinitions> | |
| <BoxView BackgroundColor="Aqua" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="5"/> | |
| <Button Image="BackIcon" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="1" Command="GoBack"/> | |
| <Image Source="Logo" Aspect="AspectFit" BackgroundColor="Transparent" Grid.Column="2" Grid.Row="0" Grid.ColumnSpan="1"/> | |
| </Grid> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ... | |
| public CustomContentPage() { | |
| NavigationPage.SetHasNavigationBar(this, false); | |
| ... | |
| } | |
| ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public MainPageViewModel() { | |
| ... | |
| var database = new Database("People"); // Creates (if does not exist) a database named People | |
| database.CreateTable<Person>(); // Creates (if does not exist) a table of type Person | |
| ... | |
| } |
NewerOlder