Skip to content

Instantly share code, notes, and snippets.

@juucustodio
Created August 15, 2018 16:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juucustodio/c4ebd4aed98a11f1547d8ecf5d183553 to your computer and use it in GitHub Desktop.
Save juucustodio/c4ebd4aed98a11f1547d8ecf5d183553 to your computer and use it in GitHub Desktop.
Example of how to implement local database in your Xamarin.Forms applications - http://julianocustodio.com/litedb
<?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:DemoLiteDB"
x:Class="DemoLiteDB.MainPage" Title="Demo LiteDB">
<StackLayout Padding="10">
<Entry x:Name="EntryName" Placeholder="Name"/>
<Button Text="Insert" Clicked="Insert"/>
<Button Text="Get" Clicked="Get" />
<ListView x:Name="ListCustomers" ItemSelected="List_Selected">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout Orientation="Horizontal" Padding="10">
<Label Text="{Binding Id}"></Label>
<Label Text="{Binding Name}"></Label>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
</ContentPage>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment