mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 14:37:01 +00:00
Fixed MapPath rendering
This commit is contained in:
parent
1ac9ee6b82
commit
29ffdc4420
5 changed files with 40 additions and 9 deletions
|
|
@ -26,6 +26,10 @@ namespace MapControl
|
|||
nameof(Locations), typeof(IEnumerable<Location>), typeof(MapPolygon),
|
||||
new PropertyMetadata(null, (o, e) => ((MapPolygon)o).DataCollectionPropertyChanged(e)));
|
||||
|
||||
public static readonly DependencyProperty FillRuleProperty = DependencyProperty.Register(
|
||||
nameof(FillRule), typeof(FillRule), typeof(MapPolygon),
|
||||
new PropertyMetadata(FillRule.EvenOdd, (o, e) => ((PathGeometry)((MapPolygon)o).Data).FillRule = (FillRule)e.NewValue));
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Locations that define the polygon points.
|
||||
/// </summary>
|
||||
|
|
@ -38,6 +42,12 @@ namespace MapControl
|
|||
set => SetValue(LocationsProperty, value);
|
||||
}
|
||||
|
||||
public FillRule FillRule
|
||||
{
|
||||
get => (FillRule)GetValue(FillRuleProperty);
|
||||
set => SetValue(FillRuleProperty, value);
|
||||
}
|
||||
|
||||
public MapPolygon()
|
||||
{
|
||||
Data = new PathGeometry();
|
||||
|
|
|
|||
|
|
@ -26,6 +26,10 @@ namespace MapControl
|
|||
nameof(Locations), typeof(IEnumerable<Location>), typeof(MapPolyline),
|
||||
new PropertyMetadata(null, (o, e) => ((MapPolyline)o).DataCollectionPropertyChanged(e)));
|
||||
|
||||
public static readonly DependencyProperty FillRuleProperty = DependencyProperty.Register(
|
||||
nameof(FillRule), typeof(FillRule), typeof(MapPolyline),
|
||||
new PropertyMetadata(FillRule.EvenOdd, (o, e) => ((PathGeometry)((MapPolyline)o).Data).FillRule = (FillRule)e.NewValue));
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Locations that define the polyline points.
|
||||
/// </summary>
|
||||
|
|
@ -38,6 +42,12 @@ namespace MapControl
|
|||
set => SetValue(LocationsProperty, value);
|
||||
}
|
||||
|
||||
public FillRule FillRule
|
||||
{
|
||||
get => (FillRule)GetValue(FillRuleProperty);
|
||||
set => SetValue(FillRuleProperty, value);
|
||||
}
|
||||
|
||||
public MapPolyline()
|
||||
{
|
||||
Data = new PathGeometry();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue