mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-08 16:05:50 +00:00
DependencyPropertyHelper
This commit is contained in:
parent
c74c2b1fed
commit
8e82e0bcbd
25 changed files with 224 additions and 176 deletions
|
|
@ -21,13 +21,13 @@ namespace MapControl
|
|||
/// </summary>
|
||||
public class MapPolygon : MapPath
|
||||
{
|
||||
public static readonly DependencyProperty LocationsProperty = DependencyProperty.Register(
|
||||
nameof(Locations), typeof(IEnumerable<Location>), typeof(MapPolygon),
|
||||
new PropertyMetadata(null, (o, e) => ((MapPolygon)o).DataCollectionPropertyChanged(e)));
|
||||
public static readonly DependencyProperty LocationsProperty =
|
||||
DependencyPropertyHelper.Register<MapPolygon, IEnumerable<Location>>(nameof(Locations), null, false,
|
||||
(polygon, oldValue, newValue) => polygon.DataCollectionPropertyChanged(oldValue, newValue));
|
||||
|
||||
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));
|
||||
public static readonly DependencyProperty FillRuleProperty =
|
||||
DependencyPropertyHelper.Register<MapPolygon, FillRule>(nameof(FillRule), FillRule.EvenOdd, false,
|
||||
(polygon, oldValue, newValue) => ((PathGeometry)polygon.Data).FillRule = newValue);
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Locations that define the polygon points.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue