Skip to content

Instantly share code, notes, and snippets.

@juucustodio
Created December 7, 2017 17:28
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save juucustodio/9579bc6fcd101bca6401c01e96e5a3bb to your computer and use it in GitHub Desktop.
Example of Bluetooth in Xamarin.Forms applications - http://julianocustodio.com/bluetooth
<?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="DemoBluetooth.MainPage">
<ContentPage.Content>
<StackLayout>
<Button Text="Search" Clicked="searchDevice"/>
<ListView x:Name="DevicesList"
IsPullToRefreshEnabled="true"
CachingStrategy="RecycleElement"
ItemSelected="DevicesList_OnItemSelected">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout>
<Label Text="{Binding NativeDevice.Name}"></Label>
<Label Text="{Binding NativeDevice.Address}" ></Label>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
</ContentPage.Content>
</ContentPage>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment