Version 4.7.1: Fixed MapOverlay Foreground and Stroke.

This commit is contained in:
ClemensF 2018-03-29 19:35:52 +02:00
parent 9566c2d708
commit de4ba0765a
13 changed files with 84 additions and 111 deletions

View file

@ -35,21 +35,17 @@ namespace MapControl
Data = new PathGeometry()
};
path.SetBinding(Shape.StrokeProperty,
GetBindingExpression(StrokeProperty)?.ParentBinding ??
new Binding
{
Source = this,
Path = new PropertyPath("Stroke")
});
path.SetBinding(Shape.StrokeProperty, new Binding
{
Source = this,
Path = new PropertyPath("Stroke")
});
path.SetBinding(Shape.StrokeThicknessProperty,
GetBindingExpression(StrokeThicknessProperty)?.ParentBinding ??
new Binding
{
Source = this,
Path = new PropertyPath("StrokeThickness")
});
path.SetBinding(Shape.StrokeThicknessProperty, new Binding
{
Source = this,
Path = new PropertyPath("StrokeThickness")
});
Children.Add(path);
}
@ -135,13 +131,11 @@ namespace MapControl
RenderTransform = renderTransform
};
label.SetBinding(TextBlock.ForegroundProperty,
GetBindingExpression(ForegroundProperty)?.ParentBinding ??
new Binding
{
Source = this,
Path = new PropertyPath("Foreground")
});
label.SetBinding(TextBlock.ForegroundProperty, new Binding
{
Source = this,
Path = new PropertyPath("Foreground")
});
Children.Add(label);
}