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
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Shapes;
|
||||
#endif
|
||||
|
||||
namespace MapControl
|
||||
|
|
@ -22,17 +20,6 @@ namespace MapControl
|
|||
/// </summary>
|
||||
public partial class MapOverlay : MapPanel
|
||||
{
|
||||
public MapOverlay()
|
||||
{
|
||||
Loaded += (s, e) =>
|
||||
{
|
||||
if (Stroke == null)
|
||||
{
|
||||
SetBinding(StrokeProperty, GetBinding(ForegroundProperty, nameof(Foreground)));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public FontFamily FontFamily
|
||||
{
|
||||
get { return (FontFamily)GetValue(FontFamilyProperty); }
|
||||
|
|
|
|||
|
|
@ -65,6 +65,11 @@ namespace MapControl
|
|||
new Binding { Source = map, Path = new PropertyPath("Foreground") });
|
||||
}
|
||||
|
||||
if (Stroke == null)
|
||||
{
|
||||
SetBinding(StrokeProperty, GetBinding(ForegroundProperty, nameof(Foreground)));
|
||||
}
|
||||
|
||||
base.SetParentMap(map);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,6 +56,17 @@ namespace MapControl
|
|||
public static readonly DependencyProperty StrokeMiterLimitProperty = Shape.StrokeMiterLimitProperty.AddOwner(
|
||||
typeof(MapOverlay), new FrameworkPropertyMetadata { AffectsRender = true });
|
||||
|
||||
public MapOverlay()
|
||||
{
|
||||
Loaded += (s, e) =>
|
||||
{
|
||||
if (Stroke == null)
|
||||
{
|
||||
SetBinding(StrokeProperty, GetBinding(ForegroundProperty, nameof(Foreground)));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public Pen CreatePen()
|
||||
{
|
||||
return new Pen
|
||||
|
|
|
|||
Loading…
Reference in a new issue