Created
August 15, 2018 16:16
-
-
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
This file contains 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: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