mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Version 4.9.0: Reworked MapPanel child arrangement.
This commit is contained in:
parent
ff013ccf86
commit
4608909ca9
|
|
@ -10,9 +10,7 @@ using Windows.UI.Xaml.Media;
|
||||||
#else
|
#else
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Data;
|
using System.Windows.Data;
|
||||||
using System.Windows.Documents;
|
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using System.Windows.Shapes;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
|
|
@ -22,17 +20,6 @@ namespace MapControl
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class MapOverlay : MapPanel
|
public partial class MapOverlay : MapPanel
|
||||||
{
|
{
|
||||||
public MapOverlay()
|
|
||||||
{
|
|
||||||
Loaded += (s, e) =>
|
|
||||||
{
|
|
||||||
if (Stroke == null)
|
|
||||||
{
|
|
||||||
SetBinding(StrokeProperty, GetBinding(ForegroundProperty, nameof(Foreground)));
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
public FontFamily FontFamily
|
public FontFamily FontFamily
|
||||||
{
|
{
|
||||||
get { return (FontFamily)GetValue(FontFamilyProperty); }
|
get { return (FontFamily)GetValue(FontFamilyProperty); }
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,11 @@ namespace MapControl
|
||||||
new Binding { Source = map, Path = new PropertyPath("Foreground") });
|
new Binding { Source = map, Path = new PropertyPath("Foreground") });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Stroke == null)
|
||||||
|
{
|
||||||
|
SetBinding(StrokeProperty, GetBinding(ForegroundProperty, nameof(Foreground)));
|
||||||
|
}
|
||||||
|
|
||||||
base.SetParentMap(map);
|
base.SetParentMap(map);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,17 @@ namespace MapControl
|
||||||
public static readonly DependencyProperty StrokeMiterLimitProperty = Shape.StrokeMiterLimitProperty.AddOwner(
|
public static readonly DependencyProperty StrokeMiterLimitProperty = Shape.StrokeMiterLimitProperty.AddOwner(
|
||||||
typeof(MapOverlay), new FrameworkPropertyMetadata { AffectsRender = true });
|
typeof(MapOverlay), new FrameworkPropertyMetadata { AffectsRender = true });
|
||||||
|
|
||||||
|
public MapOverlay()
|
||||||
|
{
|
||||||
|
Loaded += (s, e) =>
|
||||||
|
{
|
||||||
|
if (Stroke == null)
|
||||||
|
{
|
||||||
|
SetBinding(StrokeProperty, GetBinding(ForegroundProperty, nameof(Foreground)));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
public Pen CreatePen()
|
public Pen CreatePen()
|
||||||
{
|
{
|
||||||
return new Pen
|
return new Pen
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue