Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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