mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-08 16:05:50 +00:00
Updated MapContentControl, MapItem, MapPath
This commit is contained in:
parent
2dc7431c25
commit
7cfb80520b
18 changed files with 216 additions and 133 deletions
|
|
@ -1,11 +1,15 @@
|
|||
#if WPF
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
#elif UWP
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Media;
|
||||
#elif WINUI
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Media;
|
||||
#elif AVALONIA
|
||||
using Avalonia;
|
||||
using Avalonia.Media;
|
||||
#endif
|
||||
|
||||
namespace MapControl
|
||||
|
|
@ -62,6 +66,22 @@ namespace MapControl
|
|||
UpdateData();
|
||||
}
|
||||
|
||||
protected void SetDataTransform(Matrix matrix)
|
||||
{
|
||||
if (Data.Transform is MatrixTransform transform
|
||||
#if WPF
|
||||
&& !transform.IsFrozen
|
||||
#endif
|
||||
)
|
||||
{
|
||||
transform.Matrix = matrix;
|
||||
}
|
||||
else
|
||||
{
|
||||
Data.Transform = new MatrixTransform { Matrix = matrix };
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void UpdateData()
|
||||
{
|
||||
if (Data != null && ParentMap != null && Location != null)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue