diff --git a/main/MyFriendsAround.WP7/MyFriendsAround.WP7.csproj b/main/MyFriendsAround.WP7/MyFriendsAround.WP7.csproj index 5573829..237d814 100644 --- a/main/MyFriendsAround.WP7/MyFriendsAround.WP7.csproj +++ b/main/MyFriendsAround.WP7/MyFriendsAround.WP7.csproj @@ -228,9 +228,15 @@ PreserveNewest + + PreserveNewest + PreserveNewest + + PreserveNewest + PreserveNewest diff --git a/main/MyFriendsAround.WP7/ViewModel/MainViewModel.cs b/main/MyFriendsAround.WP7/ViewModel/MainViewModel.cs index f85c727..2e9dbfb 100644 --- a/main/MyFriendsAround.WP7/ViewModel/MainViewModel.cs +++ b/main/MyFriendsAround.WP7/ViewModel/MainViewModel.cs @@ -69,6 +69,8 @@ namespace MyFriendsAround.WP7.ViewModel CropCancelCommand = new RelayCommand(() => CropCancel()); MapViewChangedCommand = new RelayCommand(boundRectangle => MapViewChanged(boundRectangle)); ShowMyLocationCommand = new RelayCommand(() => ShowMyLocation()); + MapZoomInCommand = new RelayCommand(() => MapZoomIn()); + MapZoomOutCommand = new RelayCommand(() => MapZoomOut()); if (IsInDesignMode) { @@ -89,6 +91,24 @@ namespace MyFriendsAround.WP7.ViewModel InitGps(); } + private void MapZoomOut() + { + // + if(MapZoom<22) + { + MapZoom++; + } + } + + private void MapZoomIn() + { + // + if (MapZoom >2 ) + { + MapZoom--; + } + } + private void InitGps() { @@ -286,12 +306,12 @@ namespace MyFriendsAround.WP7.ViewModel /// The property's name. /// public const string MyPicturePropertyName = "MyPicture"; - private BitmapSource _myPicture = new BitmapImage(new Uri("/icons/anonymousIcon.png", UriKind.RelativeOrAbsolute)); + private ImageSource _myPicture = new BitmapImage(new Uri("/icons/anonymousIcon.png", UriKind.RelativeOrAbsolute)); /// /// Gets the MyPicture property. /// - public BitmapSource MyPicture + public ImageSource MyPicture { get { @@ -586,6 +606,8 @@ namespace MyFriendsAround.WP7.ViewModel public ICommand CropSaveCommand { get; set; } public ICommand CropCancelCommand { get; set; } public ICommand MapViewChangedCommand { get; set; } + public ICommand MapZoomInCommand { get; set; } + public ICommand MapZoomOutCommand { get; set; } #endregion diff --git a/main/MyFriendsAround.WP7/Views/MainPage.xaml b/main/MyFriendsAround.WP7/Views/MainPage.xaml index ef98f12..ef9ba31 100644 --- a/main/MyFriendsAround.WP7/Views/MainPage.xaml +++ b/main/MyFriendsAround.WP7/Views/MainPage.xaml @@ -144,31 +144,41 @@ + Width="64"> + Margin="0,0,-20,0"> - - - + + + + + + + + + + + + + + + @@ -200,8 +210,7 @@ Opacity="1" Source="{Binding MyPicture, Mode=OneWay}" Margin="0" - Stretch="Fill" - > + Stretch="Fill">