mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-06 15:05:50 +00:00
Version 4.9.0: Reworked MapPanel child arrangement.
This commit is contained in:
parent
0a7d0fccd2
commit
56d376c4d0
24 changed files with 326 additions and 322 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue