mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-06 06:55:04 +00:00
Fixed MapPath rendering
This commit is contained in:
parent
1ac9ee6b82
commit
29ffdc4420
5 changed files with 40 additions and 9 deletions
|
|
@ -14,6 +14,11 @@ namespace MapControl
|
|||
{
|
||||
public partial class MapPath : Shape, IWeakEventListener
|
||||
{
|
||||
public MapPath()
|
||||
{
|
||||
Stretch = Stretch.None;
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty DataProperty = Path.DataProperty.AddOwner(
|
||||
typeof(MapPath), new PropertyMetadata(null, DataPropertyChanged));
|
||||
|
||||
|
|
@ -25,11 +30,6 @@ namespace MapControl
|
|||
|
||||
protected override Geometry DefiningGeometry => Data;
|
||||
|
||||
protected override Geometry GetLayoutClip(Size layoutSlotSize)
|
||||
{
|
||||
return ClipToBounds ? base.GetLayoutClip(layoutSlotSize) : null;
|
||||
}
|
||||
|
||||
private static void DataPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
// Check if Data is actually a new Geometry.
|
||||
|
|
@ -98,7 +98,7 @@ namespace MapControl
|
|||
{
|
||||
StartPoint = points.First(),
|
||||
IsClosed = closed,
|
||||
IsFilled = closed
|
||||
IsFilled = true
|
||||
};
|
||||
|
||||
figure.Segments.Add(new PolyLineSegment(points.Skip(1), true));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue