Version 4.9.0: Reworked MapPanel child arrangement.

This commit is contained in:
ClemensF 2018-04-30 23:13:50 +02:00
parent 0a7d0fccd2
commit 56d376c4d0
24 changed files with 326 additions and 322 deletions

View file

@ -26,7 +26,7 @@ namespace MapControl
public class MapScale : MapOverlay
{
public static readonly DependencyProperty PaddingProperty = DependencyProperty.Register(
nameof(Padding), typeof(Thickness), typeof(MapScale), null);
nameof(Padding), typeof(Thickness), typeof(MapScale), new PropertyMetadata(new Thickness(4)));
private TextBlock label = new TextBlock();
private Polyline line = new Polyline();
@ -34,11 +34,11 @@ namespace MapControl
public MapScale()
{
IsHitTestVisible = false;
#if WINDOWS_UWP
MinWidth = 100d;
Padding = new Thickness(4d);
HorizontalAlignment = HorizontalAlignment.Left;
VerticalAlignment = VerticalAlignment.Bottom;
#else
SetCurrentValue(MinWidthProperty, 100d);
#endif
label.HorizontalAlignment = HorizontalAlignment.Left;
label.VerticalAlignment = VerticalAlignment.Top;
label.TextAlignment = TextAlignment.Center;
@ -49,16 +49,12 @@ namespace MapControl
Path = new PropertyPath("Foreground")
});
line.SetBinding(Shape.StrokeProperty, new Binding
{
Source = this,
Path = new PropertyPath("Stroke")
});
line.SetBinding(Shape.StrokeThicknessProperty, new Binding
{
Source = this,