mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-06 15:05:50 +00:00
Introduced MapContentControl
This commit is contained in:
parent
207565feba
commit
67e9989327
16 changed files with 218 additions and 143 deletions
|
|
@ -2,6 +2,7 @@
|
|||
// © 2021 Clemens Fischer
|
||||
// Licensed under the Microsoft Public License (Ms-PL)
|
||||
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Media;
|
||||
|
|
@ -61,18 +62,14 @@ namespace MapControl
|
|||
IsHitTestVisibleProperty.OverrideMetadata(typeof(MapOverlay), new FrameworkPropertyMetadata(false));
|
||||
}
|
||||
|
||||
public MapOverlay()
|
||||
protected override void OnInitialized(EventArgs e)
|
||||
{
|
||||
// Set Stroke Binding in a Loaded handler to allow Stroke value from a Style Setter.
|
||||
// SetParentMap is called too early.
|
||||
base.OnInitialized(e);
|
||||
|
||||
Loaded += (s, e) =>
|
||||
if (Stroke == null)
|
||||
{
|
||||
if (Stroke == null)
|
||||
{
|
||||
SetBinding(StrokeProperty, GetBinding(ForegroundProperty, nameof(Foreground)));
|
||||
}
|
||||
};
|
||||
SetBinding(StrokeProperty, GetBinding(nameof(Foreground)));
|
||||
}
|
||||
}
|
||||
|
||||
public Pen CreatePen()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue