×
Namespaces

Variants
Actions
(Difference between revisions)

How to use Cimbalino Windows Phone Toolkit Location

From Nokia Developer Wiki
Jump to: navigation, search
hamishwillee (Talk | contribs)
m (Hamishwillee - Bot update - Fix metadata)
hamishwillee (Talk | contribs)
m (Hamishwillee - Tidy code examples)
Line 1: Line 1:
[[Category:Windows Phone 7.5]][[Category:Windows Phone 8]][[Category:How To]][[Category:MVVM Light Toolkit]][[Category:Cimbalino Windows Phone Toolkit]]
+
[[Category:Location on Windows Phone]][[Category:Cimbalino Windows Phone Toolkit]][[Category:MVVM Light Toolkit]][[Category:How To]][[Category:XAML]][[Category:Windows Phone 7.5]][[Category:Windows Phone 8]]
{{Abstract|This samples has the goal to show how to use Cimbalino Windows Phone Toolkit Location – LocationService. }}  
+
{{Abstract|This article shows how to access locations information using {{Icode|LocationService}} from the [http://cimbalino.org/ Cimbalino Windows Phone Toolkit].}}
 
+
  
 
{{ArticleMetaData <!-- v1.3 -->
 
{{ArticleMetaData <!-- v1.3 -->
Line 27: Line 26:
  
 
[https://github.com/Cimbalino/Cimbalino-Phone-Toolkit/blob/master/src/Cimbalino.Phone.Toolkit.Location%20(WP71)/Services/ILocationService.cs ILocationService] - Represents an interface for a service capable of handling the device location capabilities. The implementation is [https://github.com/Cimbalino/Cimbalino-Phone-Toolkit/blob/master/src/Cimbalino.Phone.Toolkit.Location%20(WP71)/Services/LocationService.cs LocationService].
 
[https://github.com/Cimbalino/Cimbalino-Phone-Toolkit/blob/master/src/Cimbalino.Phone.Toolkit.Location%20(WP71)/Services/ILocationService.cs ILocationService] - Represents an interface for a service capable of handling the device location capabilities. The implementation is [https://github.com/Cimbalino/Cimbalino-Phone-Toolkit/blob/master/src/Cimbalino.Phone.Toolkit.Location%20(WP71)/Services/LocationService.cs LocationService].
 
  
 
This article explains how to use the service in an [http://mvvmlight.codeplex.com/ MVVM Light] app. Developers should first read [[How to use MVVM Light Toolkit for Windows Phone#How to use services|How to use MVVM Light Toolkit for Windows Phone]] for a general overview of MVVM Light and how to use services.
 
This article explains how to use the service in an [http://mvvmlight.codeplex.com/ MVVM Light] app. Developers should first read [[How to use MVVM Light Toolkit for Windows Phone#How to use services|How to use MVVM Light Toolkit for Windows Phone]] for a general overview of MVVM Light and how to use services.
Line 46: Line 44:
  
 
{{Note| you must specify the following capabilities in the app manifest: ID_CAP_LOCATION}}
 
{{Note| you must specify the following capabilities in the app manifest: ID_CAP_LOCATION}}
 
  
  
Line 53: Line 50:
 
Register the service in the {{Icode|ViewModelLocator}} constructor as shown below  
 
Register the service in the {{Icode|ViewModelLocator}} constructor as shown below  
  
<code csharp>
+
<code csharp 1 highlight="9-12">
/// <summary>
+
 
     /// This class contains static references to all the view models in the
 
     /// This class contains static references to all the view models in the
 
     /// application and provides an entry point for the bindings.
 
     /// application and provides an entry point for the bindings.
    /// </summary>
 
 
     public class ViewModelLocator
 
     public class ViewModelLocator
 
     {
 
     {
        /// <summary>
 
 
         /// Initializes a new instance of the ViewModelLocator class.
 
         /// Initializes a new instance of the ViewModelLocator class.
        /// </summary>
 
 
         public ViewModelLocator()
 
         public ViewModelLocator()
 
         {
 
         {
Line 73: Line 66:
 
         }
 
         }
  
        /// <summary>
+
 
 
         /// Gets the main view model.
 
         /// Gets the main view model.
        /// </summary>
 
        /// <value>
 
        /// The main view model.
 
        /// </value>
 
 
         public MainViewModel MainViewModel
 
         public MainViewModel MainViewModel
 
         {
 
         {
Line 101: Line 90:
 
Then we should implement the '''MainViewModel.cs''' class as following:
 
Then we should implement the '''MainViewModel.cs''' class as following:
  
<code csharp>
+
<code csharp 1 highlight="34">
  using System.Windows;
+
  using System.Windows;
 
     using System.Windows.Input;
 
     using System.Windows.Input;
 
     using System.Windows.Threading;
 
     using System.Windows.Threading;
Line 110: Line 99:
 
     using GalaSoft.MvvmLight.Command;
 
     using GalaSoft.MvvmLight.Command;
 
     using GalaSoft.MvvmLight;
 
     using GalaSoft.MvvmLight;
    /// <summary>
+
 
 
     /// This class contains properties that the main View can data bind to.
 
     /// This class contains properties that the main View can data bind to.
    /// </summary>
 
 
     public class MainViewModel : ViewModelBase
 
     public class MainViewModel : ViewModelBase
 
     {
 
     {
        /// <summary>
 
 
         /// The location service
 
         /// The location service
        /// </summary>
 
 
         private readonly ILocationService _locationService;
 
         private readonly ILocationService _locationService;
  
 
         private bool _isLocationEnable;
 
         private bool _isLocationEnable;
  
        /// <summary>
 
 
         /// Define if is start enable
 
         /// Define if is start enable
        /// </summary>
 
 
         private bool _isStartEnable;
 
         private bool _isStartEnable;
  
        /// <summary>
 
 
         /// Define if is stop enable
 
         /// Define if is stop enable
        /// </summary>
 
 
         private bool _isStopEnable;
 
         private bool _isStopEnable;
  
        /// <summary>
 
 
         /// The latitude
 
         /// The latitude
        /// </summary>
 
 
         private double _latitude;
 
         private double _latitude;
  
        /// <summary>
 
 
         /// The logitude
 
         /// The logitude
        /// </summary>
 
 
         private double _longitude;
 
         private double _longitude;
  
        /// <summary>
 
 
         /// The status
 
         /// The status
        /// </summary>
 
 
         private LocationServiceStatus _status;
 
         private LocationServiceStatus _status;
        /// <summary>
+
 
 
         /// Initializes a new instance of the MainViewModel class.
 
         /// Initializes a new instance of the MainViewModel class.
        /// </summary>
 
 
         public MainViewModel(ILocationService locationService)
 
         public MainViewModel(ILocationService locationService)
 
         {
 
         {
Line 163: Line 138:
 
         }
 
         }
  
        /// <summary>
 
 
         /// Gets or sets a value indicating whether [is location enable].
 
         /// Gets or sets a value indicating whether [is location enable].
        /// </summary>
 
        /// <value>
 
        ///  <c>true</c> if [is location enable]; otherwise, <c>false</c>.
 
        /// </value>
 
 
         public bool IsLocationEnable
 
         public bool IsLocationEnable
 
         {
 
         {
Line 181: Line 151:
 
         }
 
         }
  
        /// <summary>
+
 
 
         /// Gets or sets a value indicating whether [is start enable].
 
         /// Gets or sets a value indicating whether [is start enable].
        /// </summary>
 
        /// <value>
 
        ///  <c>true</c> if [is start enable]; otherwise, <c>false</c>.
 
        /// </value>
 
 
         public bool IsStartEnable
 
         public bool IsStartEnable
 
         {
 
         {
Line 199: Line 165:
 
         }
 
         }
  
        /// <summary>
 
 
         /// Gets or sets a value indicating whether [is stop enable].
 
         /// Gets or sets a value indicating whether [is stop enable].
        /// </summary>
 
        /// <value>
 
        ///  <c>true</c> if [is stop enable]; otherwise, <c>false</c>.
 
        /// </value>
 
 
         public bool IsStopEnable
 
         public bool IsStopEnable
 
         {
 
         {
Line 217: Line 178:
 
         }
 
         }
  
        /// <summary>
 
 
         /// Gets or sets the latitude.
 
         /// Gets or sets the latitude.
        /// </summary>
 
        /// <value>
 
        /// The latitude.
 
        /// </value>
 
 
         public double Latitude
 
         public double Latitude
 
         {
 
         {
Line 235: Line 191:
 
         }
 
         }
  
        /// <summary>
 
 
         /// Gets or sets the location command.
 
         /// Gets or sets the location command.
        /// </summary>
 
        /// <value>
 
        /// The get location command.
 
        /// </value>
 
 
         public ICommand LocationCommand { get; private set; }
 
         public ICommand LocationCommand { get; private set; }
  
        /// <summary>
 
 
         /// Gets or sets the longitude.
 
         /// Gets or sets the longitude.
        /// </summary>
 
        /// <value>
 
        /// The logitude.
 
        /// </value>
 
 
         public double Longitude
 
         public double Longitude
 
         {
 
         {
Line 261: Line 207:
 
         }
 
         }
  
        /// <summary>
 
 
         /// Gets or sets the start command.
 
         /// Gets or sets the start command.
        /// </summary>
 
        /// <value>
 
        /// The start command.
 
        /// </value>
 
 
         public ICommand StartCommand { get; private set; }
 
         public ICommand StartCommand { get; private set; }
  
        /// <summary>
 
 
         /// Gets or sets the status.
 
         /// Gets or sets the status.
        /// </summary>
 
        /// <value>
 
        /// The status.
 
        /// </value>
 
 
         public LocationServiceStatus Status
 
         public LocationServiceStatus Status
 
         {
 
         {
Line 286: Line 222:
 
             }
 
             }
 
         }
 
         }
        /// <summary>
+
 
 
         /// Gets or sets the stop command.
 
         /// Gets or sets the stop command.
        /// </summary>
 
        /// <value>
 
        /// The stop command.
 
        /// </value>
 
 
         public ICommand StopCommand { get; private set; }
 
         public ICommand StopCommand { get; private set; }
        /// <summary>
+
 
 
         /// Unregisters this instance from the Messenger class.
 
         /// Unregisters this instance from the Messenger class.
        /// <para>To cleanup additional resources, override this method, clean
 
        /// up and then call base.Cleanup().</para>
 
        /// </summary>
 
 
         public override void Cleanup()
 
         public override void Cleanup()
 
         {
 
         {
Line 305: Line 234:
 
         }
 
         }
  
        /// <summary>
 
 
         /// Gets the location.
 
         /// Gets the location.
        /// </summary>
 
 
         private async void GetLocation()
 
         private async void GetLocation()
 
         {
 
         {
Line 315: Line 242:
 
         }
 
         }
  
        /// <summary>
 
 
         /// Handles the PositionChanged event of the LocationService control.
 
         /// Handles the PositionChanged event of the LocationService control.
        /// </summary>
 
        /// <param name="sender">The source of the event.</param>
 
        /// <param name="e">The <see cref="LocationServicePositionChangedEventArgs"/> instance containing the event data.</param>
 
 
         private void LocationService_PositionChanged(object sender, LocationServicePositionChangedEventArgs e)
 
         private void LocationService_PositionChanged(object sender, LocationServicePositionChangedEventArgs e)
 
         {
 
         {
Line 329: Line 252:
 
         }
 
         }
  
        /// <summary>
 
 
         /// Handles the StatusChanged event of the _locationService control.
 
         /// Handles the StatusChanged event of the _locationService control.
        /// </summary>
 
        /// <param name="sender">The source of the event.</param>
 
        /// <param name="e">The <see cref="LocationServiceStatusChangedEventArgs"/> instance containing the event data.</param>
 
 
         private void LocationService_StatusChanged(object sender, LocationServiceStatusChangedEventArgs e)
 
         private void LocationService_StatusChanged(object sender, LocationServiceStatusChangedEventArgs e)
 
         {
 
         {
Line 339: Line 258:
 
         }
 
         }
  
        /// <summary>
 
 
         /// Starts the location service.
 
         /// Starts the location service.
        /// </summary>
 
 
         private void Start()
 
         private void Start()
 
         {
 
         {
Line 350: Line 267:
 
         }
 
         }
  
        /// <summary>
 
 
         /// Stops the location service.
 
         /// Stops the location service.
        /// </summary>
 
 
         private void Stop()
 
         private void Stop()
 
         {
 
         {
Line 373: Line 288:
 
The '''MainPage.xaml''' can be the following:
 
The '''MainPage.xaml''' can be the following:
  
<code xml>
+
<code xml 1 highlight="8,9">
 
<phone:PhoneApplicationPage x:Class="CimbalinoSample.MainPage"
 
<phone:PhoneApplicationPage x:Class="CimbalinoSample.MainPage"
 
                             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 
                             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

Revision as of 07:40, 27 November 2013

This article shows how to access locations information using LocationService from the Cimbalino Windows Phone Toolkit.

SignpostIcon XAML 40.png
WP Metro Icon WP8.png
SignpostIcon WP7 70px.png
Article Metadata
Tested with
SDK: Windows Phone 8.0 SDK, Windows Phone 7.1.1. SDK
Devices(s): Lumia 800, Lumia 920
CompatibilityPlatform Security
Capabilities: ID_CAP_LOCATION
Article
Created: saramgsilva (18 Nov 2013)
Last edited: hamishwillee (27 Nov 2013)

Contents

Introduction

The Cimbalino Windows Phone Toolkit delivers a set of useful and powerful MVVM-compatible tools and services to help developers build Silverlight applications for Windows Phone. The Toolkit is divided in projects which deliver different features, ranging from base MVVM services and helpers, through to code for background agents, and for accessing media library, location services etc. Cimbalino.Phone.Toolkit.Location is a MVVM compatible services for location access.

ILocationService - Represents an interface for a service capable of handling the device location capabilities. The implementation is LocationService.

This article explains how to use the service in an MVVM Light app. Developers should first read How to use MVVM Light Toolkit for Windows Phone for a general overview of MVVM Light and how to use services.


Building the example code

The source code for the code example is available here: (github).

To build the source code you will also need the MVVM Light Toolkit and the Cimbalino Windows Phone Toolkit. Their packages are available in the Nuget Package Manager. For more details see:


The sample is built using MVVM Light and the article does not go into great detail about the plumbing/infrastructure provided by the toolkit. For more information see:


Note.pngNote: you must specify the following capabilities in the app manifest: ID_CAP_LOCATION


Registering the service

Register the service in the ViewModelLocator constructor as shown below

  1.     /// This class contains static references to all the view models in the
  2.     /// application and provides an entry point for the bindings.
  3.     public class ViewModelLocator
  4.     {
  5.         /// Initializes a new instance of the ViewModelLocator class.
  6.         public ViewModelLocator()
  7.         {
  8.             ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default);
  9.             if (!SimpleIoc.Default.IsRegistered<ILocationService>())
  10.             {
  11.                 SimpleIoc.Default.Register<ILocationService, LocationService>();
  12.             }
  13.             SimpleIoc.Default.Register<MainViewModel>();
  14.         }
  15.  
  16.  
  17.         /// Gets the main view model.
  18.         public MainViewModel MainViewModel
  19.         {
  20.             get
  21.             {
  22.                 return ServiceLocator.Current.GetInstance<MainViewModel>();
  23.             }
  24.         }
  25.  
  26.         public static void Cleanup()
  27.         {
  28.             // TODO Clear the ViewModels
  29.             var viewModelLocator = (ViewModelLocator)App.Current.Resources["Locator"];
  30.             viewModelLocator.MainViewModel.Cleanup();
  31.         }
  32.     }


Implementing the ViewModel

Then we should implement the MainViewModel.cs class as following:

  1.    using System.Windows;
  2.     using System.Windows.Input;
  3.     using System.Windows.Threading;
  4.  
  5.     using Cimbalino.Phone.Toolkit.Services;
  6.  
  7.     using GalaSoft.MvvmLight.Command;
  8.     using GalaSoft.MvvmLight;
  9.  
  10.     /// This class contains properties that the main View can data bind to.
  11.     public class MainViewModel : ViewModelBase
  12.     {
  13.         /// The location service
  14.         private readonly ILocationService _locationService;
  15.  
  16.         private bool _isLocationEnable;
  17.  
  18.         /// Define if is start enable
  19.         private bool _isStartEnable;
  20.  
  21.         /// Define if is stop enable
  22.         private bool _isStopEnable;
  23.  
  24.         /// The latitude
  25.         private double _latitude;
  26.  
  27.         /// The logitude
  28.         private double _longitude;
  29.  
  30.         /// The status
  31.         private LocationServiceStatus _status;
  32.  
  33.         /// Initializes a new instance of the MainViewModel class.
  34.         public MainViewModel(ILocationService locationService)
  35.         {
  36.             IsStartEnable = true;
  37.             IsLocationEnable = true;
  38.             IsStopEnable = false;
  39.             _locationService = locationService;
  40.             _locationService.ReportInterval = 5;
  41.             _locationService.PositionChanged += LocationService_PositionChanged;
  42.             _locationService.StatusChanged += LocationService_StatusChanged;
  43.             StartCommand =new RelayCommand(Start);
  44.             StopCommand =new RelayCommand(Stop);
  45.             LocationCommand = new RelayCommand(GetLocation);
  46.         }
  47.  
  48.         /// Gets or sets a value indicating whether [is location enable].
  49.         public bool IsLocationEnable
  50.         {
  51.             get
  52.             {
  53.                 return this._isLocationEnable;
  54.             }
  55.             set
  56.             {
  57.                 Set("IsLocationEnable", ref _isLocationEnable, value);
  58.             }
  59.         }
  60.  
  61.  
  62.         /// Gets or sets a value indicating whether [is start enable].
  63.         public bool IsStartEnable
  64.         {
  65.             get
  66.             {
  67.                 return this._isStartEnable;
  68.             }
  69.             set
  70.             {
  71.                 Set("IsStartEnable", ref _isStartEnable, value);
  72.             }
  73.         }
  74.  
  75.         /// Gets or sets a value indicating whether [is stop enable].
  76.         public bool IsStopEnable
  77.         {
  78.             get
  79.             {
  80.                 return this._isStopEnable;
  81.             }
  82.             set
  83.             {
  84.                 Set("IsStopEnable", ref _isStopEnable, value);
  85.             }
  86.         }
  87.  
  88.         /// Gets or sets the latitude.
  89.         public double Latitude
  90.         {
  91.             get
  92.             {
  93.                 return _latitude;
  94.             }
  95.             set
  96.             {
  97.                 Set("Latitude", ref _latitude, value);
  98.             }
  99.         }
  100.  
  101.         /// Gets or sets the location command.
  102.         public ICommand LocationCommand { get; private set; }
  103.  
  104.         /// Gets or sets the longitude.
  105.         public double Longitude
  106.         {
  107.             get
  108.             {
  109.                 return this._longitude;
  110.             }
  111.             set
  112.             {
  113.                 Set("Longitude", ref _longitude, value);
  114.             }
  115.         }
  116.  
  117.         /// Gets or sets the start command.
  118.         public ICommand StartCommand { get; private set; }
  119.  
  120.         /// Gets or sets the status.
  121.         public LocationServiceStatus Status
  122.         {
  123.             get
  124.             {
  125.                 return _status;
  126.             }
  127.             set
  128.             {
  129.                 Set("Status", ref _status, value);
  130.             }
  131.         }
  132.  
  133.         /// Gets or sets the stop command.
  134.         public ICommand StopCommand { get; private set; }
  135.  
  136.         /// Unregisters this instance from the Messenger class.
  137.         public override void Cleanup()
  138.         {
  139.             base.Cleanup();
  140.             _locationService.PositionChanged -= LocationService_PositionChanged;
  141.             _locationService.StatusChanged -= LocationService_StatusChanged;
  142.         }
  143.  
  144.         /// Gets the location.
  145.         private async void GetLocation()
  146.         {
  147.             var result = await _locationService.GetPositionAsync();
  148.             Longitude = result.Longitude;
  149.             Latitude = result.Latitude;
  150.         }
  151.  
  152.         /// Handles the PositionChanged event of the LocationService control.
  153.         private void LocationService_PositionChanged(object sender, LocationServicePositionChangedEventArgs e)
  154.         {
  155.             Deployment.Current.Dispatcher.BeginInvoke(delegate
  156.                 {
  157.                     Latitude = e.Position.Latitude;
  158.                     Longitude = e.Position.Longitude;
  159.                 });
  160.         }
  161.  
  162.         /// Handles the StatusChanged event of the _locationService control.
  163.         private void LocationService_StatusChanged(object sender, LocationServiceStatusChangedEventArgs e)
  164.         {
  165.             Deployment.Current.Dispatcher.BeginInvoke(delegate { Status = e.Status; });
  166.         }
  167.  
  168.         /// Starts the location service.
  169.         private void Start()
  170.         {
  171.             IsStartEnable = false;
  172.             IsStopEnable = true;
  173.             IsLocationEnable = false;
  174.             _locationService.Start();
  175.         }
  176.  
  177.         /// Stops the location service.
  178.         private void Stop()
  179.         {
  180.             IsLocationEnable = true;
  181.             IsStartEnable = true;
  182.             IsStopEnable = false;
  183.             _locationService.Stop();
  184.         }
  185.     }

Implementing the View

Add the binding in main page like:

DataContext="{Binding MainViewModel, Source={StaticResource Locator}}"

The MainPage.xaml can be the following:

  1. <phone:PhoneApplicationPage x:Class="CimbalinoSample.MainPage"
  2.                             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3.                             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4.                             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5.                             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6.                             xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
  7.                             xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
  8.                             DataContext="{Binding MainViewModel,
  9.                                                   Source={StaticResource Locator}}"
  10.                             FontFamily="{StaticResource PhoneFontFamilyNormal}"
  11.                             FontSize="{StaticResource PhoneFontSizeNormal}"
  12.                             Foreground="{StaticResource PhoneForegroundBrush}"
  13.                             Orientation="Portrait"
  14.                             SupportedOrientations="Portrait"
  15.                             shell:SystemTray.IsVisible="True"
  16.                             mc:Ignorable="d">
  17.  
  18.     <!--  LayoutRoot is the root grid where all page content is placed  -->
  19.     <Grid x:Name="LayoutRoot" Background="Transparent">
  20.         <Grid.RowDefinitions>
  21.             <RowDefinition Height="Auto" />
  22.             <RowDefinition Height="*" />
  23.         </Grid.RowDefinitions>
  24.  
  25.         <!--  TitlePanel contains the name of the application and page title  -->
  26.         <StackPanel x:Name="TitlePanel"
  27.                     Grid.Row="0"
  28.                     Margin="12,17,0,28">
  29.             <TextBlock Margin="12,0"
  30.                        Style="{StaticResource PhoneTextTitle2Style}"
  31.                        Text="Cimbalino Sample" />
  32.             <TextBlock Margin="9,-7,0,0"
  33.                        Style="{StaticResource PhoneTextTitle1Style}"
  34.                        Text="Location" />
  35.         </StackPanel>
  36.  
  37.         <!--  ContentPanel - place additional content here  -->
  38.         <Grid x:Name="ContentPanel"
  39.               Grid.Row="1"
  40.               Margin="12,0,12,0">
  41.             <TextBlock TextWrapping="Wrap">
  42.                 Latitude:<Run Text="{Binding Latitude}" />
  43.             </TextBlock>
  44.             <TextBlock Margin="0,51,0,-51" TextWrapping="Wrap">
  45.                 Logitude:<Run Text="{Binding Longitude}" />
  46.             </TextBlock>
  47.             <TextBlock Margin="0,102,0,-102" TextWrapping="Wrap">
  48.                 Status:<Run Text="{Binding Status}" />
  49.             </TextBlock>
  50.             <Button Margin="0,298,0,214"
  51.                     IsEnabled="{Binding IsStartEnable}"
  52.                     Command="{Binding StartCommand}"
  53.                     Content="Start" />
  54.             <Button Height="76"
  55.                     IsEnabled="{Binding IsStopEnable}"
  56.                     Margin="0,0,0,138"
  57.                     VerticalAlignment="Bottom"
  58.                     Command="{Binding StopCommand}"
  59.                     Content="Stop" />
  60.             <Button Margin="0,219,0,293"
  61.                     IsEnabled="{Binding IsLocationEnable}"
  62.                     Command="{Binding LocationCommand}"
  63.                     Content="Get location" />
  64.         </Grid>
  65.     </Grid>
  66. </phone:PhoneApplicationPage>
74 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×