mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-04 14:08:32 +00:00
Use AddOwner for MapBase.Foreground
This commit is contained in:
parent
3c907c3345
commit
197f004eeb
10 changed files with 45 additions and 60 deletions
|
|
@ -46,5 +46,12 @@ namespace MapControl
|
|||
|
||||
return property;
|
||||
}
|
||||
|
||||
public static StyledProperty<TValue> AddOwner<TOwner, TValue>(
|
||||
StyledProperty<TValue> property)
|
||||
where TOwner : AvaloniaObject
|
||||
{
|
||||
return property.AddOwner<TOwner>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ 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;
|
||||
|
|
@ -15,6 +16,9 @@ namespace MapControl
|
|||
{
|
||||
public partial class MapBase
|
||||
{
|
||||
public static readonly StyledProperty<IBrush> ForegroundProperty =
|
||||
DependencyPropertyHelper.AddOwner<MapBase, IBrush>(TextElement.ForegroundProperty);
|
||||
|
||||
public static readonly StyledProperty<Easing> AnimationEasingProperty =
|
||||
DependencyPropertyHelper.Register<MapBase, Easing>(nameof(AnimationEasing), new QuadraticEaseOut());
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,10 @@
|
|||
<DefineConstants>AVALONIA</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="..\..\MapControl.snk" Link="MapControl.snk" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="..\Shared\*.cs" />
|
||||
<Compile Remove="..\Shared\BindingHelper.cs" />
|
||||
|
|
@ -33,10 +37,6 @@
|
|||
<Compile Remove="..\Shared\ViewTransform.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="..\..\MapControl.snk" Link="MapControl.snk" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia" Version="11.0.10" />
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="8.0.0" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue