mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-04 14:08:32 +00:00
Added Avalonia MapOverlay and MapScale
This commit is contained in:
parent
192ecbf4df
commit
35c0076336
11 changed files with 210 additions and 123 deletions
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Shapes;
|
||||
|
|
@ -42,15 +43,9 @@ namespace MapControl
|
|||
public static readonly DependencyProperty StrokeDashOffsetProperty =
|
||||
DependencyPropertyHelper.AddOwner<MapOverlay, double>(Shape.StrokeDashOffsetProperty);
|
||||
|
||||
public static readonly DependencyProperty StrokeDashCapProperty =
|
||||
public static readonly DependencyProperty StrokeLineCapProperty =
|
||||
DependencyPropertyHelper.AddOwner<MapOverlay, PenLineCap>(Shape.StrokeDashCapProperty);
|
||||
|
||||
public static readonly DependencyProperty StrokeStartLineCapProperty =
|
||||
DependencyPropertyHelper.AddOwner<MapOverlay, PenLineCap>(Shape.StrokeStartLineCapProperty);
|
||||
|
||||
public static readonly DependencyProperty StrokeEndLineCapProperty =
|
||||
DependencyPropertyHelper.AddOwner<MapOverlay, PenLineCap>(Shape.StrokeEndLineCapProperty);
|
||||
|
||||
public static readonly DependencyProperty StrokeLineJoinProperty =
|
||||
DependencyPropertyHelper.AddOwner<MapOverlay, PenLineJoin>(Shape.StrokeLineJoinProperty);
|
||||
|
||||
|
|
@ -61,9 +56,10 @@ namespace MapControl
|
|||
{
|
||||
base.OnInitialized(e);
|
||||
|
||||
// If this.Stroke is not explicitly set, bind it to this.Foreground.
|
||||
//
|
||||
this.SetBindingOnUnsetProperty(StrokeProperty, this, ForegroundProperty, nameof(Foreground));
|
||||
if (Stroke == null)
|
||||
{
|
||||
SetBinding(StrokeProperty, this.CreateBinding(nameof(Foreground)));
|
||||
}
|
||||
}
|
||||
|
||||
public Pen CreatePen()
|
||||
|
|
@ -74,9 +70,9 @@ namespace MapControl
|
|||
Thickness = StrokeThickness,
|
||||
LineJoin = StrokeLineJoin,
|
||||
MiterLimit = StrokeMiterLimit,
|
||||
StartLineCap = StrokeStartLineCap,
|
||||
EndLineCap = StrokeEndLineCap,
|
||||
DashCap = StrokeDashCap,
|
||||
StartLineCap = StrokeLineCap,
|
||||
EndLineCap = StrokeLineCap,
|
||||
DashCap = StrokeLineCap,
|
||||
DashStyle = new DashStyle(StrokeDashArray, StrokeDashOffset)
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue