Version 4.1.0

This commit is contained in:
ClemensF 2017-08-23 23:33:27 +02:00
parent 0be26af38c
commit ef6d1ed959
15 changed files with 186 additions and 129 deletions

View file

@ -4,6 +4,7 @@
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Media;
using System.Windows.Shapes;
@ -50,24 +51,23 @@ namespace MapControl
public static readonly DependencyProperty StrokeMiterLimitProperty = Shape.StrokeMiterLimitProperty.AddOwner(
typeof(MapOverlay), new FrameworkPropertyMetadata { AffectsRender = true });
protected Typeface CreateTypeface()
protected override void SetParentMapOverride(MapBase parentMap)
{
return new Typeface(FontFamily, FontStyle, FontWeight, FontStretch);
}
protected Pen CreatePen()
{
return new Pen
if (GetBindingExpression(StrokeProperty) != null)
{
Brush = Stroke ?? Foreground,
Thickness = StrokeThickness,
DashStyle = new DashStyle(StrokeDashArray, StrokeDashOffset),
DashCap = StrokeDashCap,
StartLineCap = StrokeStartLineCap,
EndLineCap = StrokeEndLineCap,
LineJoin = StrokeLineJoin,
MiterLimit = StrokeMiterLimit
};
ClearValue(StrokeProperty);
}
if (parentMap != null && Stroke == null)
{
SetBinding(StrokeProperty, new Binding
{
Source = parentMap,
Path = new PropertyPath("Foreground")
});
}
base.SetParentMapOverride(parentMap);
}
}
}