Skip to content

Instantly share code, notes, and snippets.

@devjaime
Created April 20, 2019 22:57
Show Gist options
  • Select an option

  • Save devjaime/d3a014d02628e7beb1f6627820ecc484 to your computer and use it in GitHub Desktop.

Select an option

Save devjaime/d3a014d02628e7beb1f6627820ecc484 to your computer and use it in GitHub Desktop.
geolocalizacion xaml
<views:BasePage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:views="clr-namespace:Geolocalizacion.View"
xmlns:viewmodels="clr-namespace:Geolocalizacion.ViewModel"
x:Class="Geolocalizacion.View.GeolocationPage"
Title="Geolocalización">
<views:BasePage.BindingContext>
<viewmodels:GeolocationViewModel />
</views:BasePage.BindingContext>
<StackLayout>
<Label Text="Obtén rápidamente la ubicación actual." FontAttributes="Bold" Margin="12" />
<ScrollView>
<StackLayout Padding="12,0,12,12" Spacing="6">
<ActivityIndicator IsVisible="{Binding IsBusy}" IsRunning="{Binding IsBusy}" />
<Label Text="Última ubicación conocida:" FontAttributes="Bold" Margin="0,6,0,0" />
<Label Text="{Binding LastLocation}" />
<Button Text="Refresh" Command="{Binding GetLastLocationCommand}" IsEnabled="{Binding IsNotBusy}" />
<Label Text="Ubicación actual:" FontAttributes="Bold" Margin="0,6,0,0" />
<Label Text="{Binding CurrentLocation}" />
<Label Text="Exactitud:" />
<Picker ItemsSource="{Binding Accuracies}"
SelectedIndex="{Binding Accuracy, Mode=TwoWay}"
IsEnabled="{Binding IsNotBusy}"
HorizontalOptions="FillAndExpand" />
<Button Text="Actualizar" Command="{Binding GetCurrentLocationCommand}" IsEnabled="{Binding IsNotBusy}" />
</StackLayout>
</ScrollView>
</StackLayout>
</views:BasePage>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment