mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-07 07:25:21 +00:00
Updated MapContentControl, MapItem, MapPath
This commit is contained in:
parent
2dc7431c25
commit
7cfb80520b
18 changed files with 216 additions and 133 deletions
|
|
@ -6,12 +6,9 @@ namespace MapControl
|
|||
{
|
||||
public partial class MapPath : Shape
|
||||
{
|
||||
public static readonly StyledProperty<Geometry> DataProperty = Path.DataProperty.AddOwner<MapPath>();
|
||||
|
||||
static MapPath()
|
||||
{
|
||||
DataProperty.Changed.AddClassHandler<MapPath, Geometry>((path, e) => path.UpdateData());
|
||||
}
|
||||
public static readonly StyledProperty<Geometry> DataProperty =
|
||||
DependencyPropertyHelper.AddOwner<MapPath, Geometry>(Path.DataProperty,
|
||||
(path, oldValue, newValue) => path.UpdateData());
|
||||
|
||||
public Geometry Data
|
||||
{
|
||||
|
|
@ -20,17 +17,5 @@ namespace MapControl
|
|||
}
|
||||
|
||||
protected override Geometry CreateDefiningGeometry() => Data;
|
||||
|
||||
private void SetDataTransform(Matrix matrix)
|
||||
{
|
||||
if (Data.Transform is MatrixTransform transform)
|
||||
{
|
||||
transform.Matrix = matrix;
|
||||
}
|
||||
else
|
||||
{
|
||||
Data.Transform = new MatrixTransform(matrix);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue