mirror of
https://github.com/farcasclaudiu/myfriendsaround.git
synced 2026-06-22 07:01:41 +03:00
imrpovements
This commit is contained in:
@@ -228,9 +228,15 @@
|
||||
<Content Include="icons\anonymousIcon.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="icons\appbar.add.rest.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="icons\appbar.feature.settings.rest.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="icons\appbar.minus.rest.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="icons\appbar.publish.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
|
||||
@@ -69,6 +69,8 @@ namespace MyFriendsAround.WP7.ViewModel
|
||||
CropCancelCommand = new RelayCommand(() => CropCancel());
|
||||
MapViewChangedCommand = new RelayCommand<LocationRect>(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 <see cref="MyPicture" /> property's name.
|
||||
/// </summary>
|
||||
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));
|
||||
|
||||
/// <summary>
|
||||
/// Gets the MyPicture property.
|
||||
/// </summary>
|
||||
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
|
||||
|
||||
|
||||
@@ -144,31 +144,41 @@
|
||||
|
||||
<Grid HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Width="64"
|
||||
>
|
||||
Width="64">
|
||||
<Rectangle RadiusX="10"
|
||||
RadiusY="10"
|
||||
Fill="Black"
|
||||
Opacity="0.3"
|
||||
Margin="0,0,-20,0"
|
||||
>
|
||||
Margin="0,0,-20,0">
|
||||
</Rectangle>
|
||||
|
||||
|
||||
<StackPanel HorizontalAlignment="Left" VerticalAlignment="Stretch">
|
||||
<Image Source="/icons/appbar.location.png"
|
||||
Margin="0"
|
||||
Width="64"
|
||||
Height="64"
|
||||
VerticalAlignment="Top"
|
||||
HorizontalAlignment="Left"
|
||||
/>
|
||||
<Image Source="/icons/appbar.location.png"
|
||||
Margin="0"
|
||||
Width="64"
|
||||
Height="64"
|
||||
VerticalAlignment="Bottom"
|
||||
HorizontalAlignment="Left" />
|
||||
<StackPanel HorizontalAlignment="Left"
|
||||
VerticalAlignment="Stretch">
|
||||
<Image Source="/icons/appbar.add.rest.png"
|
||||
Margin="0"
|
||||
Width="64"
|
||||
Height="64"
|
||||
VerticalAlignment="Top"
|
||||
HorizontalAlignment="Left">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="MouseLeftButtonDown">
|
||||
<cmd:EventToCommand Command="{Binding MapZoomOutCommand}" />
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</Image>
|
||||
<Image Source="/icons/appbar.minus.rest.png"
|
||||
Margin="0"
|
||||
Width="64"
|
||||
Height="64"
|
||||
VerticalAlignment="Bottom"
|
||||
HorizontalAlignment="Left">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="MouseLeftButtonDown">
|
||||
<cmd:EventToCommand Command="{Binding MapZoomInCommand}" />
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</Image>
|
||||
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
@@ -200,8 +210,7 @@
|
||||
Opacity="1"
|
||||
Source="{Binding MyPicture, Mode=OneWay}"
|
||||
Margin="0"
|
||||
Stretch="Fill"
|
||||
>
|
||||
Stretch="Fill">
|
||||
</Image>
|
||||
<Border Background="{StaticResource PhoneAccentBrush}"
|
||||
Width="80"
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 271 B |
Binary file not shown.
|
After Width: | Height: | Size: 204 B |
Reference in New Issue
Block a user