mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 22:46:58 +00:00
Version 4.7.1: Fixed MapOverlay Foreground and Stroke.
This commit is contained in:
parent
9566c2d708
commit
de4ba0765a
13 changed files with 84 additions and 111 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,35 +58,13 @@ namespace MapControl
|
|||
|
||||
protected override void SetParentMap(MapBase parentMap)
|
||||
{
|
||||
if (GetBindingExpression(ForegroundProperty) != null)
|
||||
if (parentMap != null && Foreground == null)
|
||||
{
|
||||
ClearValue(ForegroundProperty);
|
||||
}
|
||||
|
||||
if (GetBindingExpression(StrokeProperty) != null)
|
||||
{
|
||||
ClearValue(StrokeProperty);
|
||||
}
|
||||
|
||||
if (parentMap != null)
|
||||
{
|
||||
if (Foreground == null)
|
||||
SetBinding(ForegroundProperty, new Binding
|
||||
{
|
||||
SetBinding(ForegroundProperty, new Binding
|
||||
{
|
||||
Source = parentMap,
|
||||
Path = new PropertyPath("Foreground")
|
||||
});
|
||||
}
|
||||
|
||||
if (Stroke == null)
|
||||
{
|
||||
SetBinding(StrokeProperty, new Binding
|
||||
{
|
||||
Source = parentMap,
|
||||
Path = new PropertyPath("Foreground")
|
||||
});
|
||||
}
|
||||
Source = parentMap,
|
||||
Path = new PropertyPath("Foreground")
|
||||
});
|
||||
}
|
||||
|
||||
base.SetParentMap(parentMap);
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ using System.Runtime.InteropServices;
|
|||
[assembly: AssemblyCompany("Clemens Fischer")]
|
||||
[assembly: AssemblyCopyright("© 2018 Clemens Fischer")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyVersion("4.7.0")]
|
||||
[assembly: AssemblyFileVersion("4.7.0")]
|
||||
[assembly: AssemblyVersion("4.7.1")]
|
||||
[assembly: AssemblyFileVersion("4.7.1")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue