Version 1.3.9: Removed IsCurrent property and Current/NotCurrent visual states from MapItem. Fixed visual states in sample Store Application.

This commit is contained in:
ClemensF 2013-08-17 08:41:11 +02:00
parent c427345896
commit 09eeb11269
21 changed files with 115 additions and 156 deletions

View file

@ -8,8 +8,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCompany("Clemens Fischer")]
[assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")] [assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyVersion("1.3.8")] [assembly: AssemblyVersion("1.3.9")]
[assembly: AssemblyFileVersion("1.3.8")] [assembly: AssemblyFileVersion("1.3.9")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
[assembly: ComVisible(false)] [assembly: ComVisible(false)]

View file

@ -8,8 +8,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCompany("Clemens Fischer")]
[assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")] [assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyVersion("1.3.8")] [assembly: AssemblyVersion("1.3.9")]
[assembly: AssemblyFileVersion("1.3.8")] [assembly: AssemblyFileVersion("1.3.9")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
[assembly: ComVisible(false)] [assembly: ComVisible(false)]

View file

@ -76,7 +76,6 @@
<Compile Include="MapGraticule.Silverlight.WinRT.cs" /> <Compile Include="MapGraticule.Silverlight.WinRT.cs" />
<Compile Include="MapImage.cs" /> <Compile Include="MapImage.cs" />
<Compile Include="MapItem.Silverlight.WinRT.cs" /> <Compile Include="MapItem.Silverlight.WinRT.cs" />
<Compile Include="MapItemsControl.cs" />
<Compile Include="MapItemsControl.Silverlight.WinRT.cs" /> <Compile Include="MapItemsControl.Silverlight.WinRT.cs" />
<Compile Include="MapPanel.cs" /> <Compile Include="MapPanel.cs" />
<Compile Include="MapPanel.Silverlight.WinRT.cs" /> <Compile Include="MapPanel.Silverlight.WinRT.cs" />

View file

@ -57,7 +57,6 @@
<Compile Include="MapBase.WPF.cs" /> <Compile Include="MapBase.WPF.cs" />
<Compile Include="MapImageLayer.cs" /> <Compile Include="MapImageLayer.cs" />
<Compile Include="MapItem.WPF.cs" /> <Compile Include="MapItem.WPF.cs" />
<Compile Include="MapItemsControl.cs" />
<Compile Include="MapItemsControl.WPF.cs" /> <Compile Include="MapItemsControl.WPF.cs" />
<Compile Include="MapImage.cs" /> <Compile Include="MapImage.cs" />
<Compile Include="MapPanel.cs" /> <Compile Include="MapPanel.cs" />

View file

@ -10,41 +10,12 @@ namespace MapControl
/// <summary> /// <summary>
/// Container class for an item in a MapItemsControl. /// Container class for an item in a MapItemsControl.
/// </summary> /// </summary>
[TemplateVisualState(Name = "NotCurrent", GroupName = "CurrentStates")]
[TemplateVisualState(Name = "Current", GroupName = "CurrentStates")]
public class MapItem : ListBoxItem public class MapItem : ListBoxItem
{ {
public static readonly DependencyProperty IsCurrentProperty = MapItemsControl.IsCurrentProperty.AddOwner(
typeof(MapItem), new PropertyMetadata((o, e) => ((MapItem)o).IsCurrentPropertyChanged((bool)e.NewValue)));
static MapItem() static MapItem()
{ {
FrameworkElement.DefaultStyleKeyProperty.OverrideMetadata( DefaultStyleKeyProperty.OverrideMetadata(
typeof(MapItem), new FrameworkPropertyMetadata(typeof(MapItem))); typeof(MapItem), new FrameworkPropertyMetadata(typeof(MapItem)));
} }
/// <summary>
/// Gets a value that indicates if the MapItem is the CurrentItem of the containing items collection.
/// </summary>
public bool IsCurrent
{
get { return (bool)GetValue(IsCurrentProperty); }
}
private void IsCurrentPropertyChanged(bool isCurrent)
{
var zIndex = Panel.GetZIndex(this);
if (isCurrent)
{
Panel.SetZIndex(this, zIndex | 0x40000000);
VisualStateManager.GoToState(this, "Current", true);
}
else
{
Panel.SetZIndex(this, zIndex & ~0x40000000);
VisualStateManager.GoToState(this, "NotCurrent", true);
}
}
} }
} }

View file

@ -2,14 +2,30 @@
// Copyright © Clemens Fischer 2012-2013 // Copyright © Clemens Fischer 2012-2013
// Licensed under the Microsoft Public License (Ms-PL) // Licensed under the Microsoft Public License (Ms-PL)
#if NETFX_CORE
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
#else
using System.Windows;
using System.Windows.Controls;
#endif
namespace MapControl namespace MapControl
{ {
public partial class MapItemsControl /// <summary>
/// Manages a collection of selectable items on a Map. Uses MapItem as item container class.
/// </summary>
public class MapItemsControl : ListBox
{ {
public MapItemsControl() public MapItemsControl()
{ {
DefaultStyleKey = typeof(MapItemsControl); DefaultStyleKey = typeof(MapItemsControl);
MapPanel.AddParentMapHandlers(this); MapPanel.AddParentMapHandlers(this);
} }
protected override DependencyObject GetContainerForItemOverride()
{
return new MapItem();
}
} }
} }

View file

@ -12,30 +12,35 @@ using System.Windows.Media;
namespace MapControl namespace MapControl
{ {
public partial class MapItemsControl /// <summary>
/// Manages a collection of selectable items on a Map. Uses MapItem as item container class.
/// </summary>
public class MapItemsControl : ListBox
{ {
public static readonly DependencyProperty SelectionGeometryProperty = DependencyProperty.Register( public static readonly DependencyProperty SelectionGeometryProperty = DependencyProperty.Register(
"SelectionGeometry", typeof(Geometry), typeof(MapItemsControl), "SelectionGeometry", typeof(Geometry), typeof(MapItemsControl),
new PropertyMetadata((o, e) => ((MapItemsControl)o).SelectionGeometryPropertyChanged((Geometry)e.NewValue))); new PropertyMetadata((o, e) => ((MapItemsControl)o).SelectionGeometryPropertyChanged((Geometry)e.NewValue)));
public static readonly DependencyProperty IsCurrentProperty = DependencyProperty.RegisterAttached(
"IsCurrent", typeof(bool), typeof(MapItemsControl), null);
static MapItemsControl() static MapItemsControl()
{ {
FrameworkElement.DefaultStyleKeyProperty.OverrideMetadata( DefaultStyleKeyProperty.OverrideMetadata(
typeof(MapItemsControl), new FrameworkPropertyMetadata(typeof(MapItemsControl))); typeof(MapItemsControl), new FrameworkPropertyMetadata(typeof(MapItemsControl)));
} }
public MapItemsControl() public MapItemsControl()
{ {
Items.CurrentChanging += OnCurrentItemChanging; Items.CurrentChanging += CurrentItemChanging;
Items.CurrentChanged += OnCurrentItemChanged; Items.CurrentChanged += CurrentItemChanged;
}
protected override DependencyObject GetContainerForItemOverride()
{
return new MapItem();
} }
/// <summary> /// <summary>
/// Gets or sets a Geometry that selects all items that lie inside its fill area, /// Gets or sets a Geometry that selects all items inside its fill area, i.e.
/// i.e. where Geometry.FillContains returns true for the item's viewport position. /// where Geometry.FillContains returns true for the item's viewport position.
/// </summary> /// </summary>
public Geometry SelectionGeometry public Geometry SelectionGeometry
{ {
@ -43,11 +48,6 @@ namespace MapControl
set { SetValue(SelectionGeometryProperty, value); } set { SetValue(SelectionGeometryProperty, value); }
} }
public static bool GetIsCurrent(UIElement element)
{
return (bool)element.GetValue(IsCurrentProperty);
}
public object GetFirstItemInGeometry(Geometry geometry) public object GetFirstItemInGeometry(Geometry geometry)
{ {
if (geometry == null || geometry.IsEmpty()) if (geometry == null || geometry.IsEmpty())
@ -62,30 +62,20 @@ namespace MapControl
{ {
if (geometry == null || geometry.IsEmpty()) if (geometry == null || geometry.IsEmpty())
{ {
return new List<object>(); return null;
} }
return new List<object>(Items.Cast<object>().Where(i => IsItemInGeometry(i, geometry))); return Items.Cast<object>().Where(i => IsItemInGeometry(i, geometry)).ToList();
} }
private void OnCurrentItemChanging(object sender, CurrentChangingEventArgs e) private bool IsItemInGeometry(object item, Geometry geometry)
{ {
var container = ContainerFromItem(Items.CurrentItem); var container = ItemContainerGenerator.ContainerFromItem(item) as UIElement;
Point? viewportPosition;
if (container != null) return container != null &&
{ (viewportPosition = MapPanel.GetViewportPosition(container)).HasValue &&
container.SetValue(IsCurrentProperty, false); geometry.FillContains(viewportPosition.Value);
}
}
private void OnCurrentItemChanged(object sender, EventArgs e)
{
var container = ContainerFromItem(Items.CurrentItem);
if (container != null)
{
container.SetValue(IsCurrentProperty, true);
}
} }
private void SelectionGeometryPropertyChanged(Geometry geometry) private void SelectionGeometryPropertyChanged(Geometry geometry)
@ -100,14 +90,26 @@ namespace MapControl
} }
} }
private bool IsItemInGeometry(object item, Geometry geometry) private void CurrentItemChanging(object sender, CurrentChangingEventArgs e)
{ {
var container = ContainerFromItem(item); var container = ItemContainerGenerator.ContainerFromItem(Items.CurrentItem) as UIElement;
Point? viewportPosition;
return container != null && if (container != null)
(viewportPosition = MapPanel.GetViewportPosition(container)).HasValue && {
geometry.FillContains(viewportPosition.Value); var zIndex = Panel.GetZIndex(container);
Panel.SetZIndex(container, zIndex & ~0x40000000);
}
}
private void CurrentItemChanged(object sender, EventArgs e)
{
var container = ItemContainerGenerator.ContainerFromItem(Items.CurrentItem) as UIElement;
if (container != null)
{
var zIndex = Panel.GetZIndex(container);
Panel.SetZIndex(container, zIndex | 0x40000000);
}
} }
} }
} }

View file

@ -1,37 +0,0 @@
// XAML Map Control - http://xamlmapcontrol.codeplex.com/
// Copyright © Clemens Fischer 2012-2013
// Licensed under the Microsoft Public License (Ms-PL)
#if NETFX_CORE
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
#else
using System.Windows;
using System.Windows.Controls;
#endif
namespace MapControl
{
/// <summary>
/// Manages a collection of selectable items on a Map. Uses MapItem as container for items
/// and (for WPF only) updates the IsCurrent attached property on each MapItem when the
/// Items.CurrentItem property changes.
/// </summary>
public partial class MapItemsControl : ListBox
{
public UIElement ContainerFromItem(object item)
{
return item != null ? ItemContainerGenerator.ContainerFromItem(item) as UIElement : null;
}
public object ItemFromContainer(DependencyObject container)
{
return container != null ? ItemContainerGenerator.ItemFromContainer(container) : null;
}
protected override DependencyObject GetContainerForItemOverride()
{
return new MapItem();
}
}
}

View file

@ -15,8 +15,8 @@ using System.Windows;
[assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCompany("Clemens Fischer")]
[assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")] [assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyVersion("1.3.8")] [assembly: AssemblyVersion("1.3.9")]
[assembly: AssemblyFileVersion("1.3.8")] [assembly: AssemblyFileVersion("1.3.9")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
[assembly: ComVisible(false)] [assembly: ComVisible(false)]

View file

@ -14,7 +14,7 @@ namespace MapControl
{ {
static Pushpin() static Pushpin()
{ {
FrameworkElement.DefaultStyleKeyProperty.OverrideMetadata( DefaultStyleKeyProperty.OverrideMetadata(
typeof(Pushpin), new FrameworkPropertyMetadata(typeof(Pushpin))); typeof(Pushpin), new FrameworkPropertyMetadata(typeof(Pushpin)));
} }
} }

View file

@ -66,9 +66,6 @@
<Compile Include="..\MapItem.Silverlight.WinRT.cs"> <Compile Include="..\MapItem.Silverlight.WinRT.cs">
<Link>MapItem.Silverlight.WinRT.cs</Link> <Link>MapItem.Silverlight.WinRT.cs</Link>
</Compile> </Compile>
<Compile Include="..\MapItemsControl.cs">
<Link>MapItemsControl.cs</Link>
</Compile>
<Compile Include="..\MapItemsControl.Silverlight.WinRT.cs"> <Compile Include="..\MapItemsControl.Silverlight.WinRT.cs">
<Link>MapItemsControl.Silverlight.WinRT.cs</Link> <Link>MapItemsControl.Silverlight.WinRT.cs</Link>
</Compile> </Compile>

View file

@ -8,8 +8,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCompany("Clemens Fischer")]
[assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")] [assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyVersion("1.3.8")] [assembly: AssemblyVersion("1.3.9")]
[assembly: AssemblyFileVersion("1.3.8")] [assembly: AssemblyFileVersion("1.3.9")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
[assembly: ComVisible(false)] [assembly: ComVisible(false)]

View file

@ -8,8 +8,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCompany("Clemens Fischer")]
[assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")] [assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyVersion("1.3.8")] [assembly: AssemblyVersion("1.3.9")]
[assembly: AssemblyFileVersion("1.3.8")] [assembly: AssemblyFileVersion("1.3.9")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
[assembly: ComVisible(false)] [assembly: ComVisible(false)]

View file

@ -62,18 +62,18 @@
</VisualState> </VisualState>
</VisualStateGroup> </VisualStateGroup>
</VisualStateManager.VisualStateGroups> </VisualStateManager.VisualStateGroups>
<Path Name="selectedPath" Fill="White" Opacity="0"> <Path x:Name="selectedPath" Fill="White" Opacity="0">
<Path.Data> <Path.Data>
<EllipseGeometry RadiusX="15" RadiusY="15"/> <EllipseGeometry RadiusX="15" RadiusY="15"/>
</Path.Data> </Path.Data>
</Path> </Path>
<Path Name="path" Fill="Transparent" Stroke="Gray" StrokeThickness="2"> <Path Fill="Transparent" Stroke="Gray" StrokeThickness="2">
<Path.Data> <Path.Data>
<EllipseGeometry RadiusX="8" RadiusY="8"/> <EllipseGeometry RadiusX="8" RadiusY="8"/>
</Path.Data> </Path.Data>
</Path> </Path>
<Grid Canvas.Left="15" Canvas.Top="-8"> <Grid Canvas.Left="15" Canvas.Top="-8">
<Rectangle Name="labelBackground" Fill="White" Opacity="0.7"/> <Rectangle x:Name="labelBackground" Fill="White" Opacity="0.7"/>
<TextBlock Margin="2,0,2,0" Text="{Binding Name}"/> <TextBlock Margin="2,0,2,0" Text="{Binding Name}"/>
</Grid> </Grid>
</Canvas> </Canvas>
@ -137,7 +137,7 @@
<ColumnDefinition/> <ColumnDefinition/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Name="mouseLocation" Margin="4" VerticalAlignment="Bottom" FontFamily="Segoe UI Mono"/> <TextBlock x:Name="mouseLocation" Margin="4" VerticalAlignment="Bottom" FontFamily="Segoe UI Mono"/>
<StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right"> <StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right">
<StackPanel Margin="5"> <StackPanel Margin="5">
<TextBlock Text="Zoom Level" Margin="0,0,0,2" HorizontalAlignment="Center" Foreground="Gray" FontSize="10"/> <TextBlock Text="Zoom Level" Margin="0,0,0,2" HorizontalAlignment="Center" Foreground="Gray" FontSize="10"/>

View file

@ -8,8 +8,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCompany("Clemens Fischer")]
[assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")] [assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyVersion("1.3.8")] [assembly: AssemblyVersion("1.3.9")]
[assembly: AssemblyFileVersion("1.3.8")] [assembly: AssemblyFileVersion("1.3.9")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
[assembly: ComVisible(false)] [assembly: ComVisible(false)]

View file

@ -47,7 +47,7 @@
<VisualStateGroup x:Name="CommonStates"> <VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal"/> <VisualState x:Name="Normal"/>
<VisualState x:Name="Disabled"/> <VisualState x:Name="Disabled"/>
<VisualState x:Name="MouseOver"> <VisualState x:Name="PointerOver">
<Storyboard> <Storyboard>
<DoubleAnimation Storyboard.TargetName="labelBackground" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.1"/> <DoubleAnimation Storyboard.TargetName="labelBackground" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.1"/>
</Storyboard> </Storyboard>
@ -60,20 +60,40 @@
<DoubleAnimation Storyboard.TargetName="selectedPath" Storyboard.TargetProperty="Opacity" To="0.7" Duration="0:0:0.1"/> <DoubleAnimation Storyboard.TargetName="selectedPath" Storyboard.TargetProperty="Opacity" To="0.7" Duration="0:0:0.1"/>
</Storyboard> </Storyboard>
</VisualState> </VisualState>
<VisualState x:Name="SelectedUnfocus">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="selectedPath" Storyboard.TargetProperty="Opacity" To="0.7" Duration="0:0:0.1"/>
</Storyboard>
</VisualState>
<VisualState x:Name="SelectedDisable">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="selectedPath" Storyboard.TargetProperty="Opacity" To="0.7" Duration="0:0:0.1"/>
</Storyboard>
</VisualState>
<VisualState x:Name="SelectedPointer">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="selectedPath" Storyboard.TargetProperty="Opacity" To="0.7" Duration="0:0:0.1"/>
</Storyboard>
</VisualState>
<VisualState x:Name="SelectedPressed">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="selectedPath" Storyboard.TargetProperty="Opacity" To="0.7" Duration="0:0:0.1"/>
</Storyboard>
</VisualState>
</VisualStateGroup> </VisualStateGroup>
</VisualStateManager.VisualStateGroups> </VisualStateManager.VisualStateGroups>
<Path Name="selectedPath" Fill="White" Opacity="0"> <Path x:Name="selectedPath" Fill="White" Opacity="0">
<Path.Data> <Path.Data>
<EllipseGeometry RadiusX="15" RadiusY="15"/> <EllipseGeometry RadiusX="15" RadiusY="15"/>
</Path.Data> </Path.Data>
</Path> </Path>
<Path Name="path" Fill="Transparent" Stroke="Gray" StrokeThickness="2"> <Path Fill="Transparent" Stroke="Gray" StrokeThickness="2">
<Path.Data> <Path.Data>
<EllipseGeometry RadiusX="8" RadiusY="8"/> <EllipseGeometry RadiusX="8" RadiusY="8"/>
</Path.Data> </Path.Data>
</Path> </Path>
<Grid Canvas.Left="15" Canvas.Top="-8"> <Grid Canvas.Left="15" Canvas.Top="-8">
<Rectangle Name="labelBackground" Fill="White" Opacity="0.7"/> <Rectangle x:Name="labelBackground" Fill="White" Opacity="0.7"/>
<TextBlock Margin="2,0,2,0" Text="{Binding Name}"/> <TextBlock Margin="2,0,2,0" Text="{Binding Name}"/>
</Grid> </Grid>
</Canvas> </Canvas>

View file

@ -8,8 +8,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCompany("Clemens Fischer")]
[assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")] [assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyVersion("1.3.8")] [assembly: AssemblyVersion("1.3.9")]
[assembly: AssemblyFileVersion("1.3.8")] [assembly: AssemblyFileVersion("1.3.9")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
[assembly: ComVisible(false)] [assembly: ComVisible(false)]

View file

@ -8,8 +8,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCompany("Clemens Fischer")]
[assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")] [assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyVersion("1.3.8")] [assembly: AssemblyVersion("1.3.9")]
[assembly: AssemblyFileVersion("1.3.8")] [assembly: AssemblyFileVersion("1.3.9")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
[assembly: ComVisible(false)] [assembly: ComVisible(false)]

View file

@ -87,21 +87,13 @@
</Storyboard> </Storyboard>
</VisualState> </VisualState>
</VisualStateGroup> </VisualStateGroup>
<VisualStateGroup x:Name="CurrentStates">
<VisualState x:Name="NotCurrent"/>
<VisualState x:Name="Current">
<Storyboard>
<ColorAnimation Storyboard.TargetName="path" Storyboard.TargetProperty="Stroke.Color" To="Magenta" Duration="0:0:0.1"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups> </VisualStateManager.VisualStateGroups>
<Path Name="selectedPath" Fill="White" Opacity="0"> <Path x:Name="selectedPath" Fill="White" Opacity="0">
<Path.Data> <Path.Data>
<EllipseGeometry RadiusX="15" RadiusY="15"/> <EllipseGeometry RadiusX="15" RadiusY="15"/>
</Path.Data> </Path.Data>
</Path> </Path>
<Path Name="path" StrokeThickness="2" Fill="Transparent"> <Path StrokeThickness="2" Fill="Transparent">
<Path.Stroke> <Path.Stroke>
<SolidColorBrush Color="Gray"/> <SolidColorBrush Color="Gray"/>
</Path.Stroke> </Path.Stroke>
@ -110,7 +102,7 @@
</Path.Data> </Path.Data>
</Path> </Path>
<Grid Canvas.Left="15" Canvas.Top="-8"> <Grid Canvas.Left="15" Canvas.Top="-8">
<Rectangle Name="labelBackground" Fill="White" Opacity="0.7"/> <Rectangle x:Name="labelBackground" Fill="White" Opacity="0.7"/>
<TextBlock Margin="2,0,2,0" Text="{Binding Name}"/> <TextBlock Margin="2,0,2,0" Text="{Binding Name}"/>
</Grid> </Grid>
</Canvas> </Canvas>
@ -152,7 +144,7 @@
<RowDefinition/> <RowDefinition/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<map:Map Name="map" Margin="2" Center="53.5,8.2" ZoomLevel="11" MaxZoomLevel="20" <map:Map x:Name="map" Margin="2" Center="53.5,8.2" ZoomLevel="11" MaxZoomLevel="20"
TileLayer="{Binding Source={StaticResource TileLayersViewSource}, Path=CurrentItem}" TileLayer="{Binding Source={StaticResource TileLayersViewSource}, Path=CurrentItem}"
MouseLeftButtonDown="MapMouseLeftButtonDown" MouseRightButtonDown="MapMouseRightButtonDown" MouseLeftButtonDown="MapMouseLeftButtonDown" MouseRightButtonDown="MapMouseRightButtonDown"
MouseMove="MapMouseMove" MouseLeave="MapMouseLeave" MouseMove="MapMouseMove" MouseLeave="MapMouseLeave"
@ -208,7 +200,7 @@
<ColumnDefinition/> <ColumnDefinition/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Name="mouseLocation" Margin="5" VerticalAlignment="Bottom" FontFamily="Segoe UI Mono"/> <TextBlock x:Name="mouseLocation" Margin="5" VerticalAlignment="Bottom" FontFamily="Segoe UI Mono"/>
<StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right"> <StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right">
<StackPanel Margin="5"> <StackPanel Margin="5">
<TextBlock Text="Zoom Level" Margin="0,0,0,2" HorizontalAlignment="Center" Foreground="Gray" FontSize="10"/> <TextBlock Text="Zoom Level" Margin="0,0,0,2" HorizontalAlignment="Center" Foreground="Gray" FontSize="10"/>

View file

@ -8,8 +8,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCompany("Clemens Fischer")]
[assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")] [assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyVersion("1.3.8")] [assembly: AssemblyVersion("1.3.9")]
[assembly: AssemblyFileVersion("1.3.8")] [assembly: AssemblyFileVersion("1.3.9")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
[assembly: ComVisible(false)] [assembly: ComVisible(false)]