mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-04 14:08:32 +00:00
Avalonia using declarations
This commit is contained in:
parent
3d275cd924
commit
286b158abe
41 changed files with 87 additions and 145 deletions
|
|
@ -2,7 +2,6 @@
|
|||
// Copyright © 2024 Clemens Fischer
|
||||
// Licensed under the Microsoft Public License (Ms-PL)
|
||||
|
||||
using Avalonia.Controls;
|
||||
using System;
|
||||
|
||||
#pragma warning disable AVP1001 // The same AvaloniaProperty should not be registered twice
|
||||
|
|
@ -82,5 +81,10 @@ namespace MapControl
|
|||
{
|
||||
return AddOwner<TOwner, TValue>((StyledProperty<TValue>)property);
|
||||
}
|
||||
|
||||
public static void SetBinding(this AvaloniaObject target, AvaloniaProperty property, Binding binding)
|
||||
{
|
||||
target.Bind(property, binding);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,9 +2,6 @@
|
|||
// Copyright © 2024 Clemens Fischer
|
||||
// Licensed under the Microsoft Public License (Ms-PL)
|
||||
|
||||
using Avalonia.Media;
|
||||
using Avalonia.Media.Imaging;
|
||||
using Avalonia.Platform;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
// Copyright © 2024 Clemens Fischer
|
||||
// Licensed under the Microsoft Public License (Ms-PL)
|
||||
|
||||
using Avalonia.Animation;
|
||||
|
||||
namespace MapControl
|
||||
{
|
||||
public class LocationAnimator : InterpolatingAnimator<Location>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// Copyright © 2024 Clemens Fischer
|
||||
// Licensed under the Microsoft Public License (Ms-PL)
|
||||
|
||||
using Avalonia.Input;
|
||||
using System;
|
||||
|
||||
namespace MapControl
|
||||
|
|
|
|||
|
|
@ -2,13 +2,6 @@
|
|||
// Copyright © 2024 Clemens Fischer
|
||||
// Licensed under the Microsoft Public License (Ms-PL)
|
||||
|
||||
global using Avalonia;
|
||||
using Avalonia.Animation;
|
||||
using Avalonia.Animation.Easings;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.Documents;
|
||||
using Avalonia.Media;
|
||||
using Avalonia.Styling;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
// Copyright © 2024 Clemens Fischer
|
||||
// Licensed under the Microsoft Public License (Ms-PL)
|
||||
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace MapControl
|
||||
{
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -2,10 +2,6 @@
|
|||
// Copyright © 2024 Clemens Fischer
|
||||
// Licensed under the Microsoft Public License (Ms-PL)
|
||||
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.Documents;
|
||||
using Avalonia.Controls.Shapes;
|
||||
using Avalonia.Media;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
|
|
|
|||
|
|
@ -2,13 +2,24 @@
|
|||
// Copyright © 2024 Clemens Fischer
|
||||
// Licensed under the Microsoft Public License (Ms-PL)
|
||||
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Media;
|
||||
|
||||
namespace MapControl
|
||||
{
|
||||
public partial class MapPanel
|
||||
{
|
||||
public static readonly AttachedProperty<bool> AutoCollapseProperty =
|
||||
DependencyPropertyHelper.RegisterAttached<MapPanel, bool>("AutoCollapse");
|
||||
|
||||
public static readonly AttachedProperty<Location> LocationProperty =
|
||||
DependencyPropertyHelper.RegisterAttached<MapPanel, Location>("Location");
|
||||
|
||||
public static readonly AttachedProperty<BoundingBox> BoundingBoxProperty =
|
||||
DependencyPropertyHelper.RegisterAttached<MapPanel, BoundingBox>("BoundingBox");
|
||||
|
||||
static MapPanel()
|
||||
{
|
||||
AffectsParentArrange<MapPanel>(LocationProperty, BoundingBoxProperty);
|
||||
}
|
||||
|
||||
public MapPanel()
|
||||
{
|
||||
if (this is MapBase mapBase)
|
||||
|
|
|
|||
|
|
@ -2,9 +2,6 @@
|
|||
// Copyright © 2024 Clemens Fischer
|
||||
// Licensed under the Microsoft Public License (Ms-PL)
|
||||
|
||||
using Avalonia.Controls.Shapes;
|
||||
using Avalonia.Media;
|
||||
|
||||
namespace MapControl
|
||||
{
|
||||
public partial class MapPath : Shape
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// Copyright © 2024 Clemens Fischer
|
||||
// Licensed under the Microsoft Public License (Ms-PL)
|
||||
|
||||
using Avalonia.Media;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
|
|
|
|||
|
|
@ -4,10 +4,6 @@
|
|||
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Animation;
|
||||
using Avalonia.Styling;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace MapControl
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
// Copyright © 2024 Clemens Fischer
|
||||
// Licensed under the Microsoft Public License (Ms-PL)
|
||||
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Media;
|
||||
using System;
|
||||
|
||||
namespace MapControl
|
||||
|
|
|
|||
|
|
@ -2,10 +2,7 @@
|
|||
// Copyright © 2024 Clemens Fischer
|
||||
// Licensed under the Microsoft Public License (Ms-PL)
|
||||
|
||||
using Avalonia.Media;
|
||||
using Avalonia.Threading;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MapControl
|
||||
|
|
@ -16,7 +13,7 @@ namespace MapControl
|
|||
/// Default folder where the Cache instance may save data, i.e. "C:\ProgramData\MapControl\TileCache".
|
||||
/// </summary>
|
||||
public static string DefaultCacheFolder =>
|
||||
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "MapControl", "TileCache");
|
||||
System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "MapControl", "TileCache");
|
||||
|
||||
|
||||
private static async Task LoadTileAsync(Tile tile, Func<Task<IImage>> loadImageFunc)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue