From c0c1a828465b8f03699d73091ea329ba86734fea Mon Sep 17 00:00:00 2001 From: TheXamlGuy Date: Fri, 24 May 2024 08:21:50 +0100 Subject: [PATCH] Codemaid --- Toolkit.Avalonia/FrameHandler.cs | 1 - Toolkit.Avalonia/NavigationRegion.cs | 2 +- Toolkit.Foundation/Activate.cs | 2 +- Toolkit.Foundation/ActivateEventArgs.cs | 2 +- Toolkit.Foundation/Activated.cs | 2 +- Toolkit.Foundation/ActivatedEventArgs.cs | 2 +- Toolkit.Foundation/AesDecryptor.cs | 4 +- Toolkit.Foundation/AesEncryptor.cs | 6 +- Toolkit.Foundation/AggerateMode.cs | 2 +- Toolkit.Foundation/Cache.cs | 2 + Toolkit.Foundation/Cancel.cs | 2 +- Toolkit.Foundation/CancelEventArgs.cs | 2 +- Toolkit.Foundation/Changed.cs | 2 +- Toolkit.Foundation/ChangedEventArgs.cs | 2 +- Toolkit.Foundation/Component.cs | 4 +- Toolkit.Foundation/ComponentFactory.cs | 6 +- Toolkit.Foundation/ComponentHost.cs | 3 +- Toolkit.Foundation/ConfirmEventArgs.cs | 2 +- Toolkit.Foundation/CreateEventArgs.cs | 2 +- Toolkit.Foundation/Created.cs | 2 +- Toolkit.Foundation/CreatedEventArgs.cs | 2 +- Toolkit.Foundation/Deactivated.cs | 2 +- Toolkit.Foundation/DeactivatedEventArgs.cs | 2 +- Toolkit.Foundation/DeleteEventArgs.cs | 2 +- Toolkit.Foundation/Edit.cs | 2 +- Toolkit.Foundation/HandlerProvider.cs | 4 +- Toolkit.Foundation/IActivated.cs | 2 +- Toolkit.Foundation/IAggerate.cs | 2 +- Toolkit.Foundation/IDecryptor.cs | 1 + Toolkit.Foundation/IDisposerRequired.cs | 2 +- Toolkit.Foundation/IHandlerProvider.cs | 5 +- Toolkit.Foundation/IHostBuilderExtension.cs | 2 +- Toolkit.Foundation/IKeyDeriver.cs | 7 +- Toolkit.Foundation/IKeyGenerator.cs | 1 + Toolkit.Foundation/IMediator.cs | 9 +- Toolkit.Foundation/IMediatorRequired.cs | 2 +- Toolkit.Foundation/INavigationRegion.cs | 2 +- Toolkit.Foundation/INavigationScope.cs | 4 +- Toolkit.Foundation/IPasswordHasher.cs | 1 + Toolkit.Foundation/IPublisher.cs | 2 +- Toolkit.Foundation/IPublisherRequired.cs | 2 +- Toolkit.Foundation/IServiceFactoryRequired.cs | 2 +- .../IServiceProviderRequired.cs | 2 +- Toolkit.Foundation/ISubscriptionRequired.cs | 2 +- Toolkit.Foundation/IValueInvoker.cs | 2 +- Toolkit.Foundation/IValueStore.cs | 2 +- Toolkit.Foundation/InsertEventArgs.cs | 2 +- Toolkit.Foundation/KeyDeriver.cs | 10 +- Toolkit.Foundation/KeyGenerator.cs | 4 +- Toolkit.Foundation/Mediator.cs | 2 +- Toolkit.Foundation/Modified.cs | 2 +- Toolkit.Foundation/ModifiedEventArgs.cs | 2 +- Toolkit.Foundation/MoveEventArgs.cs | 2 +- Toolkit.Foundation/MoveToEventArgs.cs | 2 +- Toolkit.Foundation/NavigateHandler.cs | 4 +- Toolkit.Foundation/NavigationScope.cs | 6 +- Toolkit.Foundation/NotificationAttribute.cs | 2 +- Toolkit.Foundation/Notify.cs | 2 +- Toolkit.Foundation/NotifyEventArgs.cs | 2 +- Toolkit.Foundation/ObservableCollection.cs | 28 +- Toolkit.Foundation/PasswordHasher.cs | 4 +- Toolkit.Foundation/Publisher.cs | 4 +- Toolkit.Foundation/RemoveAt.cs | 2 +- Toolkit.Foundation/RemoveAtEventArgs.cs | 2 +- Toolkit.Foundation/ReplaceEventArgs.cs | 2 +- Toolkit.Foundation/Request.cs | 2 +- Toolkit.Foundation/RequestEventArgs.cs | 2 +- Toolkit.Foundation/SelectionEventArgs.cs | 2 +- Toolkit.Foundation/Subscription.cs | 1 - Toolkit.Foundation/Toolkit.Foundation.csproj | 4 +- Toolkit.Foundation/ValidationEventArgs.cs | 2 +- Toolkit.Foundation/ValueStore.cs | 2 +- Toolkit.UI.Avalonia/AttachedBehaviour.cs | 2 +- .../AttachedEventTriggerBehaviour.cs | 7 +- .../InvokeNavigationViewItemAction.cs | 2 +- Toolkit.UI.Avalonia/ItemInvokedEventArgs.cs | 5 +- Toolkit.UI.Avalonia/NavigateRegionAction.cs | 7 +- .../NavigationViewItemExtension.cs | 14 +- .../ContentDialog/ContentDialog.axaml | 357 ------------------ .../IconElement/BitmapIcon.cs | 3 +- .../IconElement/BitmapIconSource.cs | 3 +- .../IconElement/ContentIcon.cs | 5 +- .../IconElement/ContentIconSource.cs | 3 +- .../IconElement/FAIconElement.cs | 3 +- .../IconElement/FAPathIcon.cs | 3 +- .../IconElement/FontIcon.cs | 3 +- .../IconElement/FontIconSource.cs | 4 +- .../IconElement/IconHelper.cs | 2 +- .../IconElement/ImageIcon.cs | 3 +- .../IconElement/ImageIconSource.cs | 3 +- .../IconElement/PathIconSource.cs | 11 +- .../IconElement/SymbolIcon.cs | 3 +- .../IconElement/SymbolIconSource.cs | 3 +- .../PersonPicture/PersonPicture.cs | 7 +- .../PersonPictureCharacterType.cs | 2 +- .../PersonPictureInitialsGenerator.cs | 10 +- .../PersonPictureTemplateSettings.cs | 3 +- .../ResponsiveGrid/ResponsiveGrid.cs | 2 +- .../ResponsiveGrid/SizeThresholds.cs | 2 +- .../SizeThresholdsTypeConverter.cs | 2 +- .../SettingsExpanderItem.axaml | 127 ------- .../Themes/ControlResources.axaml | 1 - .../Toolkit.UI.Controls.Avalonia.csproj | 2 +- 103 files changed, 168 insertions(+), 655 deletions(-) delete mode 100644 Toolkit.UI.Controls.Avalonia/ContentDialog/ContentDialog.axaml diff --git a/Toolkit.Avalonia/FrameHandler.cs b/Toolkit.Avalonia/FrameHandler.cs index 466b7fb..2be9c6b 100644 --- a/Toolkit.Avalonia/FrameHandler.cs +++ b/Toolkit.Avalonia/FrameHandler.cs @@ -2,7 +2,6 @@ using Avalonia.Controls.Primitives; using FluentAvalonia.UI.Media.Animation; using FluentAvalonia.UI.Navigation; -using System.Reflection; using Toolkit.Foundation; using Toolkit.UI.Controls.Avalonia; diff --git a/Toolkit.Avalonia/NavigationRegion.cs b/Toolkit.Avalonia/NavigationRegion.cs index 82d2897..cd3c49e 100644 --- a/Toolkit.Avalonia/NavigationRegion.cs +++ b/Toolkit.Avalonia/NavigationRegion.cs @@ -7,7 +7,7 @@ namespace Toolkit.Avalonia; public class NavigationRegion(INavigationRegionCollection collection) : INavigationRegion { - public void Register(string name, + public void Register(string name, object target) { if (target is Control control) diff --git a/Toolkit.Foundation/Activate.cs b/Toolkit.Foundation/Activate.cs index 870a837..51d6d4c 100644 --- a/Toolkit.Foundation/Activate.cs +++ b/Toolkit.Foundation/Activate.cs @@ -5,4 +5,4 @@ public record Activate public static ActivateEventArgs As(TValue value) => new(value); public static ActivateEventArgs As() where TValue : new() => new(new TValue()); -} +} \ No newline at end of file diff --git a/Toolkit.Foundation/ActivateEventArgs.cs b/Toolkit.Foundation/ActivateEventArgs.cs index 59d933d..d4cd45e 100644 --- a/Toolkit.Foundation/ActivateEventArgs.cs +++ b/Toolkit.Foundation/ActivateEventArgs.cs @@ -1,3 +1,3 @@ namespace Toolkit.Foundation; -public record ActivateEventArgs(TValue? Value = default); +public record ActivateEventArgs(TValue? Value = default); \ No newline at end of file diff --git a/Toolkit.Foundation/Activated.cs b/Toolkit.Foundation/Activated.cs index 94360dc..b11a16e 100644 --- a/Toolkit.Foundation/Activated.cs +++ b/Toolkit.Foundation/Activated.cs @@ -5,4 +5,4 @@ public record Activated public static ActivatedEventArgs As(TValue value) => new(value); public static ActivatedEventArgs As() where TValue : new() => new(new TValue()); -} +} \ No newline at end of file diff --git a/Toolkit.Foundation/ActivatedEventArgs.cs b/Toolkit.Foundation/ActivatedEventArgs.cs index d1e536b..3d2a526 100644 --- a/Toolkit.Foundation/ActivatedEventArgs.cs +++ b/Toolkit.Foundation/ActivatedEventArgs.cs @@ -1,3 +1,3 @@ namespace Toolkit.Foundation; -public record ActivatedEventArgs(TValue? Value = default); +public record ActivatedEventArgs(TValue? Value = default); \ No newline at end of file diff --git a/Toolkit.Foundation/AesDecryptor.cs b/Toolkit.Foundation/AesDecryptor.cs index c988943..8851e2e 100644 --- a/Toolkit.Foundation/AesDecryptor.cs +++ b/Toolkit.Foundation/AesDecryptor.cs @@ -8,7 +8,7 @@ public class AesDecryptor : private const int IvSize = 16; public bool TryDecrypt(byte[] cipher, - byte[] key, + byte[] key, out byte[]? decryptedData) { decryptedData = null; @@ -47,4 +47,4 @@ public class AesDecryptor : return false; } } -} +} \ No newline at end of file diff --git a/Toolkit.Foundation/AesEncryptor.cs b/Toolkit.Foundation/AesEncryptor.cs index 08a3996..c07c90f 100644 --- a/Toolkit.Foundation/AesEncryptor.cs +++ b/Toolkit.Foundation/AesEncryptor.cs @@ -2,12 +2,12 @@ namespace Toolkit.Foundation; -public class AesEncryptor : +public class AesEncryptor : IEncryptor { private const int IvSize = 16; - public bool TryEncrypt(byte[] data, + public bool TryEncrypt(byte[] data, byte[] key, out byte[]? encryptedData) { @@ -46,4 +46,4 @@ public class AesEncryptor : return false; } } -} +} \ No newline at end of file diff --git a/Toolkit.Foundation/AggerateMode.cs b/Toolkit.Foundation/AggerateMode.cs index e7f4d54..7b91899 100644 --- a/Toolkit.Foundation/AggerateMode.cs +++ b/Toolkit.Foundation/AggerateMode.cs @@ -4,4 +4,4 @@ public enum AggerateMode { Append, Reset -} +} \ No newline at end of file diff --git a/Toolkit.Foundation/Cache.cs b/Toolkit.Foundation/Cache.cs index 4d70bb8..5ad43f1 100644 --- a/Toolkit.Foundation/Cache.cs +++ b/Toolkit.Foundation/Cache.cs @@ -66,6 +66,7 @@ public class Cache(IComparer comparer) : notnull { private readonly List> items = []; + public TValue? this[TKey key] { get @@ -108,6 +109,7 @@ public class Cache(IComparer comparer) : items.Insert(index, new KeyValuePair(key, value)); } + public void Clear() => items.Clear(); public IEnumerator> GetEnumerator() => diff --git a/Toolkit.Foundation/Cancel.cs b/Toolkit.Foundation/Cancel.cs index d9cdcf2..16c479a 100644 --- a/Toolkit.Foundation/Cancel.cs +++ b/Toolkit.Foundation/Cancel.cs @@ -7,4 +7,4 @@ public record Cancel public static CancelEventArgs As() where TValue : new() => new(new TValue()); -} +} \ No newline at end of file diff --git a/Toolkit.Foundation/CancelEventArgs.cs b/Toolkit.Foundation/CancelEventArgs.cs index 5792b3a..906ca41 100644 --- a/Toolkit.Foundation/CancelEventArgs.cs +++ b/Toolkit.Foundation/CancelEventArgs.cs @@ -1,3 +1,3 @@ namespace Toolkit.Foundation; -public record CancelEventArgs(TValue Value); +public record CancelEventArgs(TValue Value); \ No newline at end of file diff --git a/Toolkit.Foundation/Changed.cs b/Toolkit.Foundation/Changed.cs index c32d286..be8dda9 100644 --- a/Toolkit.Foundation/Changed.cs +++ b/Toolkit.Foundation/Changed.cs @@ -5,4 +5,4 @@ public record Changed public static ChangedEventArgs As(TValue value) => new(value); public static ChangedEventArgs As() where TValue : new() => new(new TValue()); -} +} \ No newline at end of file diff --git a/Toolkit.Foundation/ChangedEventArgs.cs b/Toolkit.Foundation/ChangedEventArgs.cs index 20cd6e3..0376401 100644 --- a/Toolkit.Foundation/ChangedEventArgs.cs +++ b/Toolkit.Foundation/ChangedEventArgs.cs @@ -1,3 +1,3 @@ namespace Toolkit.Foundation; -public record ChangedEventArgs(TValue? Value = default); +public record ChangedEventArgs(TValue? Value = default); \ No newline at end of file diff --git a/Toolkit.Foundation/Component.cs b/Toolkit.Foundation/Component.cs index 2ea0c05..37639e1 100644 --- a/Toolkit.Foundation/Component.cs +++ b/Toolkit.Foundation/Component.cs @@ -13,7 +13,7 @@ public class Component : } public static TComponent? Create(IServiceProvider provider, - Action builderDelegate) + Action builderDelegate) where TComponent : class, IComponent { if (provider.GetRequiredService() is IServiceFactory factory) @@ -23,7 +23,7 @@ public class Component : return factory.Create(builder); } - return default ; + return default; } public virtual IComponentBuilder Create() => builder; diff --git a/Toolkit.Foundation/ComponentFactory.cs b/Toolkit.Foundation/ComponentFactory.cs index 68c32c0..a7988be 100644 --- a/Toolkit.Foundation/ComponentFactory.cs +++ b/Toolkit.Foundation/ComponentFactory.cs @@ -4,11 +4,11 @@ namespace Toolkit.Foundation; public class ComponentFactory(IServiceProvider provider, IProxyServiceCollection proxy, - IComponentScopeCollection scopes) : + IComponentScopeCollection scopes) : IComponentFactory { public IComponentHost? Create(string name, - TConfiguration configuration, + TConfiguration configuration, Action? servicesDelegate = null) where TComponent : IComponent where TConfiguration : ComponentConfiguration, new() @@ -56,4 +56,4 @@ public class ComponentFactory(IServiceProvider provider, return default; } -} +} \ No newline at end of file diff --git a/Toolkit.Foundation/ComponentHost.cs b/Toolkit.Foundation/ComponentHost.cs index 61d2461..55736b5 100644 --- a/Toolkit.Foundation/ComponentHost.cs +++ b/Toolkit.Foundation/ComponentHost.cs @@ -10,14 +10,13 @@ public class ComponentHost(IServiceProvider services, { public IServiceProvider Services => services; - public void Dispose() { } public TConfiguration? GetConfiguration() where TConfiguration : ComponentConfiguration { - return Services.GetService(); + return Services.GetService(); } public async Task StartAsync(CancellationToken cancellationToken = default) diff --git a/Toolkit.Foundation/ConfirmEventArgs.cs b/Toolkit.Foundation/ConfirmEventArgs.cs index d817934..16d4dc2 100644 --- a/Toolkit.Foundation/ConfirmEventArgs.cs +++ b/Toolkit.Foundation/ConfirmEventArgs.cs @@ -1,3 +1,3 @@ namespace Toolkit.Foundation; -public record ConfirmEventArgs(TValue Value); +public record ConfirmEventArgs(TValue Value); \ No newline at end of file diff --git a/Toolkit.Foundation/CreateEventArgs.cs b/Toolkit.Foundation/CreateEventArgs.cs index 6e9723d..58ced3a 100644 --- a/Toolkit.Foundation/CreateEventArgs.cs +++ b/Toolkit.Foundation/CreateEventArgs.cs @@ -1,3 +1,3 @@ namespace Toolkit.Foundation; -public record CreateEventArgs(TValue Value); +public record CreateEventArgs(TValue Value); \ No newline at end of file diff --git a/Toolkit.Foundation/Created.cs b/Toolkit.Foundation/Created.cs index 0d00928..42bc553 100644 --- a/Toolkit.Foundation/Created.cs +++ b/Toolkit.Foundation/Created.cs @@ -7,4 +7,4 @@ public record Created public static CreatedEventArgs As() where TValue : new() => new(new TValue()); -} +} \ No newline at end of file diff --git a/Toolkit.Foundation/CreatedEventArgs.cs b/Toolkit.Foundation/CreatedEventArgs.cs index cdb03eb..7a2c4cf 100644 --- a/Toolkit.Foundation/CreatedEventArgs.cs +++ b/Toolkit.Foundation/CreatedEventArgs.cs @@ -1,3 +1,3 @@ namespace Toolkit.Foundation; -public record CreatedEventArgs(TValue Value); +public record CreatedEventArgs(TValue Value); \ No newline at end of file diff --git a/Toolkit.Foundation/Deactivated.cs b/Toolkit.Foundation/Deactivated.cs index 33ecdde..3f975bc 100644 --- a/Toolkit.Foundation/Deactivated.cs +++ b/Toolkit.Foundation/Deactivated.cs @@ -5,4 +5,4 @@ public record Deactivated public static DeactivatedEventArgs As(TValue value) => new(value); public static DeactivatedEventArgs As() where TValue : new() => new(new TValue()); -} +} \ No newline at end of file diff --git a/Toolkit.Foundation/DeactivatedEventArgs.cs b/Toolkit.Foundation/DeactivatedEventArgs.cs index 99aadc3..917c38b 100644 --- a/Toolkit.Foundation/DeactivatedEventArgs.cs +++ b/Toolkit.Foundation/DeactivatedEventArgs.cs @@ -1,3 +1,3 @@ namespace Toolkit.Foundation; -public record DeactivatedEventArgs(TValue? Value = default); +public record DeactivatedEventArgs(TValue? Value = default); \ No newline at end of file diff --git a/Toolkit.Foundation/DeleteEventArgs.cs b/Toolkit.Foundation/DeleteEventArgs.cs index 6901eff..6037a7e 100644 --- a/Toolkit.Foundation/DeleteEventArgs.cs +++ b/Toolkit.Foundation/DeleteEventArgs.cs @@ -1,3 +1,3 @@ namespace Toolkit.Foundation; -public record DeleteEventArgs(TValue Value); +public record DeleteEventArgs(TValue Value); \ No newline at end of file diff --git a/Toolkit.Foundation/Edit.cs b/Toolkit.Foundation/Edit.cs index f39068d..9edf1f3 100644 --- a/Toolkit.Foundation/Edit.cs +++ b/Toolkit.Foundation/Edit.cs @@ -7,4 +7,4 @@ public record Edit public static EditEventArgs As() where TValue : new() => new(new TValue()); -} +} \ No newline at end of file diff --git a/Toolkit.Foundation/HandlerProvider.cs b/Toolkit.Foundation/HandlerProvider.cs index cadc785..d0f215e 100644 --- a/Toolkit.Foundation/HandlerProvider.cs +++ b/Toolkit.Foundation/HandlerProvider.cs @@ -1,6 +1,6 @@ namespace Toolkit.Foundation; -public class HandlerProvider(SubscriptionCollection subscriptions) : +public class HandlerProvider(SubscriptionCollection subscriptions) : IHandlerProvider { public IEnumerable Get(Type type, @@ -24,4 +24,4 @@ public class HandlerProvider(SubscriptionCollection subscriptions) : } } } -} +} \ No newline at end of file diff --git a/Toolkit.Foundation/IActivated.cs b/Toolkit.Foundation/IActivated.cs index aded530..3e00d74 100644 --- a/Toolkit.Foundation/IActivated.cs +++ b/Toolkit.Foundation/IActivated.cs @@ -8,4 +8,4 @@ public interface IActivated public interface IActivated { Task Activated(TResult result); -} +} \ No newline at end of file diff --git a/Toolkit.Foundation/IAggerate.cs b/Toolkit.Foundation/IAggerate.cs index 3510f94..a3d9453 100644 --- a/Toolkit.Foundation/IAggerate.cs +++ b/Toolkit.Foundation/IAggerate.cs @@ -3,4 +3,4 @@ public interface IAggerate { object? Key { get; init; } -} +} \ No newline at end of file diff --git a/Toolkit.Foundation/IDecryptor.cs b/Toolkit.Foundation/IDecryptor.cs index 70c47c1..96031d4 100644 --- a/Toolkit.Foundation/IDecryptor.cs +++ b/Toolkit.Foundation/IDecryptor.cs @@ -1,4 +1,5 @@ namespace Toolkit.Foundation; + public interface IDecryptor { bool TryDecrypt(byte[] cipher, diff --git a/Toolkit.Foundation/IDisposerRequired.cs b/Toolkit.Foundation/IDisposerRequired.cs index a5a9cc7..2842b49 100644 --- a/Toolkit.Foundation/IDisposerRequired.cs +++ b/Toolkit.Foundation/IDisposerRequired.cs @@ -3,4 +3,4 @@ public interface IDisposerRequired { IDisposer Disposer { get; } -} +} \ No newline at end of file diff --git a/Toolkit.Foundation/IHandlerProvider.cs b/Toolkit.Foundation/IHandlerProvider.cs index a62ea93..94005b4 100644 --- a/Toolkit.Foundation/IHandlerProvider.cs +++ b/Toolkit.Foundation/IHandlerProvider.cs @@ -1,8 +1,7 @@ - -namespace Toolkit.Foundation; +namespace Toolkit.Foundation; public interface IHandlerProvider { - IEnumerable Get(Type type, + IEnumerable Get(Type type, object? key = null); } \ No newline at end of file diff --git a/Toolkit.Foundation/IHostBuilderExtension.cs b/Toolkit.Foundation/IHostBuilderExtension.cs index dd9723e..bdd4314 100644 --- a/Toolkit.Foundation/IHostBuilderExtension.cs +++ b/Toolkit.Foundation/IHostBuilderExtension.cs @@ -153,4 +153,4 @@ public static class IHostBuilderExtension return builder; } -} +} \ No newline at end of file diff --git a/Toolkit.Foundation/IKeyDeriver.cs b/Toolkit.Foundation/IKeyDeriver.cs index 02fae2c..8ab44bf 100644 --- a/Toolkit.Foundation/IKeyDeriver.cs +++ b/Toolkit.Foundation/IKeyDeriver.cs @@ -1,8 +1,9 @@ namespace Toolkit.Foundation; + public interface IKeyDeriver { byte[] DeriveKey(byte[] phrased, - byte[] salt, - int keySize = 32, + byte[] salt, + int keySize = 32, int iterations = 10000); -} +} \ No newline at end of file diff --git a/Toolkit.Foundation/IKeyGenerator.cs b/Toolkit.Foundation/IKeyGenerator.cs index aeaaa74..416e420 100644 --- a/Toolkit.Foundation/IKeyGenerator.cs +++ b/Toolkit.Foundation/IKeyGenerator.cs @@ -1,4 +1,5 @@ namespace Toolkit.Foundation; + public interface IKeyGenerator { byte[] Generate(int size); diff --git a/Toolkit.Foundation/IMediator.cs b/Toolkit.Foundation/IMediator.cs index 3879384..3d720bc 100644 --- a/Toolkit.Foundation/IMediator.cs +++ b/Toolkit.Foundation/IMediator.cs @@ -1,13 +1,12 @@ - -namespace Toolkit.Foundation +namespace Toolkit.Foundation { public interface IMediator { - Task Handle(object message, + Task Handle(object message, CancellationToken cancellationToken = default); - Task Handle(TMessage message, - CancellationToken cancellationToken = default) + Task Handle(TMessage message, + CancellationToken cancellationToken = default) where TMessage : notnull; } } \ No newline at end of file diff --git a/Toolkit.Foundation/IMediatorRequired.cs b/Toolkit.Foundation/IMediatorRequired.cs index c6c138c..0ab9d7e 100644 --- a/Toolkit.Foundation/IMediatorRequired.cs +++ b/Toolkit.Foundation/IMediatorRequired.cs @@ -3,4 +3,4 @@ public interface IMediatorRequired { IMediator Mediator { get; } -} +} \ No newline at end of file diff --git a/Toolkit.Foundation/INavigationRegion.cs b/Toolkit.Foundation/INavigationRegion.cs index 9fbf297..4887ab5 100644 --- a/Toolkit.Foundation/INavigationRegion.cs +++ b/Toolkit.Foundation/INavigationRegion.cs @@ -4,4 +4,4 @@ public interface INavigationRegion { void Register(string name, object target); -} +} \ No newline at end of file diff --git a/Toolkit.Foundation/INavigationScope.cs b/Toolkit.Foundation/INavigationScope.cs index 24223d5..2c8f519 100644 --- a/Toolkit.Foundation/INavigationScope.cs +++ b/Toolkit.Foundation/INavigationScope.cs @@ -2,10 +2,10 @@ public interface INavigationScope { - void Navigate(string route, + void Navigate(string route, object? sender = null, object? region = null, - EventHandler? navigated = null, + EventHandler? navigated = null, object[]? parameters = null); void Back(object? region); diff --git a/Toolkit.Foundation/IPasswordHasher.cs b/Toolkit.Foundation/IPasswordHasher.cs index d31d66e..604cf1a 100644 --- a/Toolkit.Foundation/IPasswordHasher.cs +++ b/Toolkit.Foundation/IPasswordHasher.cs @@ -1,4 +1,5 @@ namespace Toolkit.Foundation; + public interface IPasswordHasher { string HashPassword(string password, int iterations = 10000); diff --git a/Toolkit.Foundation/IPublisher.cs b/Toolkit.Foundation/IPublisher.cs index 0a05a60..2980f7d 100644 --- a/Toolkit.Foundation/IPublisher.cs +++ b/Toolkit.Foundation/IPublisher.cs @@ -11,7 +11,7 @@ public interface IPublisher void Publish(TMessage message, object key) where TMessage : notnull; - + void Publish(object message, Func, Task> marshal, object? key = null); diff --git a/Toolkit.Foundation/IPublisherRequired.cs b/Toolkit.Foundation/IPublisherRequired.cs index beb8728..20212c1 100644 --- a/Toolkit.Foundation/IPublisherRequired.cs +++ b/Toolkit.Foundation/IPublisherRequired.cs @@ -3,4 +3,4 @@ public interface IPublisherRequired { IPublisher Publisher { get; } -} +} \ No newline at end of file diff --git a/Toolkit.Foundation/IServiceFactoryRequired.cs b/Toolkit.Foundation/IServiceFactoryRequired.cs index 8a77d43..05c2324 100644 --- a/Toolkit.Foundation/IServiceFactoryRequired.cs +++ b/Toolkit.Foundation/IServiceFactoryRequired.cs @@ -3,4 +3,4 @@ public interface IServiceFactoryRequired { IServiceFactory Factory { get; } -} +} \ No newline at end of file diff --git a/Toolkit.Foundation/IServiceProviderRequired.cs b/Toolkit.Foundation/IServiceProviderRequired.cs index edb0f13..09933d4 100644 --- a/Toolkit.Foundation/IServiceProviderRequired.cs +++ b/Toolkit.Foundation/IServiceProviderRequired.cs @@ -3,4 +3,4 @@ public interface IServiceProviderRequired { IServiceProvider Provider { get; } -} +} \ No newline at end of file diff --git a/Toolkit.Foundation/ISubscriptionRequired.cs b/Toolkit.Foundation/ISubscriptionRequired.cs index 250433e..726cdd7 100644 --- a/Toolkit.Foundation/ISubscriptionRequired.cs +++ b/Toolkit.Foundation/ISubscriptionRequired.cs @@ -3,4 +3,4 @@ public interface ISubscriptionRequired { ISubscription Subscription { get; } -} +} \ No newline at end of file diff --git a/Toolkit.Foundation/IValueInvoker.cs b/Toolkit.Foundation/IValueInvoker.cs index 6bac696..67d14b0 100644 --- a/Toolkit.Foundation/IValueInvoker.cs +++ b/Toolkit.Foundation/IValueInvoker.cs @@ -3,4 +3,4 @@ public interface IValueInvoker { public void Invoke(TValue args); -} +} \ No newline at end of file diff --git a/Toolkit.Foundation/IValueStore.cs b/Toolkit.Foundation/IValueStore.cs index ac6ca2a..02b1859 100644 --- a/Toolkit.Foundation/IValueStore.cs +++ b/Toolkit.Foundation/IValueStore.cs @@ -5,4 +5,4 @@ public interface IValueStore T? Value { get; } void Set(T value); -} +} \ No newline at end of file diff --git a/Toolkit.Foundation/InsertEventArgs.cs b/Toolkit.Foundation/InsertEventArgs.cs index a33df15..00cac55 100644 --- a/Toolkit.Foundation/InsertEventArgs.cs +++ b/Toolkit.Foundation/InsertEventArgs.cs @@ -1,3 +1,3 @@ namespace Toolkit.Foundation; -public record InsertEventArgs(int Index, TValue Value); +public record InsertEventArgs(int Index, TValue Value); \ No newline at end of file diff --git a/Toolkit.Foundation/KeyDeriver.cs b/Toolkit.Foundation/KeyDeriver.cs index 44bda0c..9ce305b 100644 --- a/Toolkit.Foundation/KeyDeriver.cs +++ b/Toolkit.Foundation/KeyDeriver.cs @@ -2,15 +2,15 @@ namespace Toolkit.Foundation; -public class KeyDeriver : +public class KeyDeriver : IKeyDeriver { - public byte[] DeriveKey(byte[] phrase, - byte[] salt, - int keySize = 32, + public byte[] DeriveKey(byte[] phrase, + byte[] salt, + int keySize = 32, int iterations = 100000) { using Rfc2898DeriveBytes pbkdf2 = new(phrase, salt, iterations, HashAlgorithmName.SHA256); return pbkdf2.GetBytes(keySize); } -} +} \ No newline at end of file diff --git a/Toolkit.Foundation/KeyGenerator.cs b/Toolkit.Foundation/KeyGenerator.cs index 362e201..e6be5ab 100644 --- a/Toolkit.Foundation/KeyGenerator.cs +++ b/Toolkit.Foundation/KeyGenerator.cs @@ -2,7 +2,7 @@ namespace Toolkit.Foundation; -public class KeyGenerator : +public class KeyGenerator : IKeyGenerator { public byte[] Generate(int size) @@ -12,4 +12,4 @@ public class KeyGenerator : return key; } -} +} \ No newline at end of file diff --git a/Toolkit.Foundation/Mediator.cs b/Toolkit.Foundation/Mediator.cs index 3bebf3b..6e50028 100644 --- a/Toolkit.Foundation/Mediator.cs +++ b/Toolkit.Foundation/Mediator.cs @@ -51,7 +51,7 @@ public class Mediator(IHandlerProvider handlerProvider, { if (handler?.GetType().GetMethod("Handle", [messageType, typeof(CancellationToken)]) is MethodInfo handleMethod) { - return await (Task)handleMethod.Invoke(handler, + return await (Task)handleMethod.Invoke(handler, new object[] { message, cancellationToken })!; } } diff --git a/Toolkit.Foundation/Modified.cs b/Toolkit.Foundation/Modified.cs index d7b32e7..0805e79 100644 --- a/Toolkit.Foundation/Modified.cs +++ b/Toolkit.Foundation/Modified.cs @@ -4,4 +4,4 @@ public record Modified { public static ModifiedEventArgs As(TValue oldValue, TValue newValue) => new(oldValue, newValue); -} +} \ No newline at end of file diff --git a/Toolkit.Foundation/ModifiedEventArgs.cs b/Toolkit.Foundation/ModifiedEventArgs.cs index a678ca9..4789668 100644 --- a/Toolkit.Foundation/ModifiedEventArgs.cs +++ b/Toolkit.Foundation/ModifiedEventArgs.cs @@ -1,3 +1,3 @@ namespace Toolkit.Foundation; -public record ModifiedEventArgs(TValue OldView, TValue NewValue); +public record ModifiedEventArgs(TValue OldView, TValue NewValue); \ No newline at end of file diff --git a/Toolkit.Foundation/MoveEventArgs.cs b/Toolkit.Foundation/MoveEventArgs.cs index 4bc8bde..877c6cb 100644 --- a/Toolkit.Foundation/MoveEventArgs.cs +++ b/Toolkit.Foundation/MoveEventArgs.cs @@ -1,3 +1,3 @@ namespace Toolkit.Foundation; -public record MoveEventArgs(int Index, TValue Value); +public record MoveEventArgs(int Index, TValue Value); \ No newline at end of file diff --git a/Toolkit.Foundation/MoveToEventArgs.cs b/Toolkit.Foundation/MoveToEventArgs.cs index 7073b17..64b22a7 100644 --- a/Toolkit.Foundation/MoveToEventArgs.cs +++ b/Toolkit.Foundation/MoveToEventArgs.cs @@ -1,3 +1,3 @@ namespace Toolkit.Foundation; -public record MoveToEventArgs(int OldIndex, int NewIndex); +public record MoveToEventArgs(int OldIndex, int NewIndex); \ No newline at end of file diff --git a/Toolkit.Foundation/NavigateHandler.cs b/Toolkit.Foundation/NavigateHandler.cs index e976f02..c20db37 100644 --- a/Toolkit.Foundation/NavigateHandler.cs +++ b/Toolkit.Foundation/NavigateHandler.cs @@ -25,8 +25,8 @@ public class NavigateHandler(NamedComponent scope, } } } - - if (navigationScope is null) + + if (navigationScope is null) { ComponentScopeDescriptor? descriptor = componentScopeProvider.Get(args.Scope ?? scope.Name); navigationScope = descriptor?.Services?.GetRequiredService(); diff --git a/Toolkit.Foundation/NavigationScope.cs b/Toolkit.Foundation/NavigationScope.cs index 40b1162..a763cd4 100644 --- a/Toolkit.Foundation/NavigationScope.cs +++ b/Toolkit.Foundation/NavigationScope.cs @@ -1,5 +1,4 @@ using Microsoft.Extensions.DependencyInjection; -using System.Data.SqlTypes; namespace Toolkit.Foundation; @@ -11,8 +10,8 @@ public class NavigationScope(IPublisher publisher, IContentTemplateDescriptorProvider contentTemplateDescriptorProvider) : INavigationScope { - public void Navigate(string route, - object? sender = null, + public void Navigate(string route, + object? sender = null, object? region = null, EventHandler? navigated = null, object[]? parameters = null) @@ -57,6 +56,7 @@ public class NavigationScope(IPublisher publisher, case "self": region = view; break; + default: if (navigationRegionProvider.TryGet(region, out object? value)) { diff --git a/Toolkit.Foundation/NotificationAttribute.cs b/Toolkit.Foundation/NotificationAttribute.cs index fa731b3..9bcc5b3 100644 --- a/Toolkit.Foundation/NotificationAttribute.cs +++ b/Toolkit.Foundation/NotificationAttribute.cs @@ -4,4 +4,4 @@ public class NotificationAttribute(object key) : Attribute { public object Key => key; -} +} \ No newline at end of file diff --git a/Toolkit.Foundation/Notify.cs b/Toolkit.Foundation/Notify.cs index fec1dbe..bb99f22 100644 --- a/Toolkit.Foundation/Notify.cs +++ b/Toolkit.Foundation/Notify.cs @@ -7,4 +7,4 @@ public class Notify public static NotifyEventArgs As() where TValue : new() => new(new TValue()); -} +} \ No newline at end of file diff --git a/Toolkit.Foundation/NotifyEventArgs.cs b/Toolkit.Foundation/NotifyEventArgs.cs index b7b03c7..a8effcb 100644 --- a/Toolkit.Foundation/NotifyEventArgs.cs +++ b/Toolkit.Foundation/NotifyEventArgs.cs @@ -1,3 +1,3 @@ namespace Toolkit.Foundation; -public record NotifyEventArgs(TValue Value); +public record NotifyEventArgs(TValue Value); \ No newline at end of file diff --git a/Toolkit.Foundation/ObservableCollection.cs b/Toolkit.Foundation/ObservableCollection.cs index 23b9606..d53349a 100644 --- a/Toolkit.Foundation/ObservableCollection.cs +++ b/Toolkit.Foundation/ObservableCollection.cs @@ -365,9 +365,29 @@ public partial class ObservableCollection : TItem item = this[oldIndex]; + bool selected = false; + if (item is ISelectable selectable) + { + selected = selectable.Selected; + + SelectedItem = default; + SelectedIndex = -1; + } + RemoveItem(oldIndex); Insert(newIndex, item); + if (selected) + { + SelectedIndex = newIndex; + SelectedItem = item; + + if (item is ISelectable selectable2) + { + selectable2.Selected = true; + } + } + return true; } @@ -493,14 +513,6 @@ public partial class ObservableCollection : added.Selected = true; } } - - partial void OnSelectedItemChanged(TItem? oldValue, TItem? newValue) - { - if (oldValue is ISelectable selectable) - { - selectable.Selected = false; - } - } } public partial class ObservableCollection(IServiceProvider provider, diff --git a/Toolkit.Foundation/PasswordHasher.cs b/Toolkit.Foundation/PasswordHasher.cs index 4ad4d48..7c1000d 100644 --- a/Toolkit.Foundation/PasswordHasher.cs +++ b/Toolkit.Foundation/PasswordHasher.cs @@ -2,7 +2,7 @@ namespace Toolkit.Foundation; -public class PasswordHasher : +public class PasswordHasher : IPasswordHasher { private const int SaltSize = 16; @@ -16,4 +16,4 @@ public class PasswordHasher : return $"{Convert.ToBase64String(salt)}:{Convert.ToBase64String(hash)}"; } -} +} \ No newline at end of file diff --git a/Toolkit.Foundation/Publisher.cs b/Toolkit.Foundation/Publisher.cs index 0489146..d2f97b5 100644 --- a/Toolkit.Foundation/Publisher.cs +++ b/Toolkit.Foundation/Publisher.cs @@ -18,7 +18,7 @@ public class Publisher(IHandlerProvider handlerProvider, Publish(message, async args => await args(), null); public void Publish(TMessage message, object key) - where TMessage : notnull => + where TMessage : notnull => Publish(message, async args => await args(), key); public void Publish(object message, @@ -59,7 +59,7 @@ public class Publisher(IHandlerProvider handlerProvider, Publish(new TMessage(), async args => await args(), null); public void PublishUI(object key) - where TMessage : new() => + where TMessage : new() => Publish(new TMessage(), args => dispatcher.Invoke(async () => await args()), key); public void PublishUI(TMessage message) diff --git a/Toolkit.Foundation/RemoveAt.cs b/Toolkit.Foundation/RemoveAt.cs index 8de3297..77da9e1 100644 --- a/Toolkit.Foundation/RemoveAt.cs +++ b/Toolkit.Foundation/RemoveAt.cs @@ -4,4 +4,4 @@ public record RemoveAt { public static RemoveAtEventArgs As(int index) => new(index); -} +} \ No newline at end of file diff --git a/Toolkit.Foundation/RemoveAtEventArgs.cs b/Toolkit.Foundation/RemoveAtEventArgs.cs index 6403a64..1a45527 100644 --- a/Toolkit.Foundation/RemoveAtEventArgs.cs +++ b/Toolkit.Foundation/RemoveAtEventArgs.cs @@ -1,3 +1,3 @@ namespace Toolkit.Foundation; -public record RemoveAtEventArgs(int Index); +public record RemoveAtEventArgs(int Index); \ No newline at end of file diff --git a/Toolkit.Foundation/ReplaceEventArgs.cs b/Toolkit.Foundation/ReplaceEventArgs.cs index e220f98..8da69c9 100644 --- a/Toolkit.Foundation/ReplaceEventArgs.cs +++ b/Toolkit.Foundation/ReplaceEventArgs.cs @@ -1,3 +1,3 @@ namespace Toolkit.Foundation; -public record ReplaceEventArgs(int Index, TValue Value); +public record ReplaceEventArgs(int Index, TValue Value); \ No newline at end of file diff --git a/Toolkit.Foundation/Request.cs b/Toolkit.Foundation/Request.cs index 555318e..cbf71d6 100644 --- a/Toolkit.Foundation/Request.cs +++ b/Toolkit.Foundation/Request.cs @@ -7,4 +7,4 @@ public class Request public static RequestEventArgs As() where TValue : new() => new(new TValue()); -} +} \ No newline at end of file diff --git a/Toolkit.Foundation/RequestEventArgs.cs b/Toolkit.Foundation/RequestEventArgs.cs index 109508e..b625de6 100644 --- a/Toolkit.Foundation/RequestEventArgs.cs +++ b/Toolkit.Foundation/RequestEventArgs.cs @@ -1,3 +1,3 @@ namespace Toolkit.Foundation; -public record RequestEventArgs(TValue Value); +public record RequestEventArgs(TValue Value); \ No newline at end of file diff --git a/Toolkit.Foundation/SelectionEventArgs.cs b/Toolkit.Foundation/SelectionEventArgs.cs index 9fb09f1..bb121bb 100644 --- a/Toolkit.Foundation/SelectionEventArgs.cs +++ b/Toolkit.Foundation/SelectionEventArgs.cs @@ -1,3 +1,3 @@ namespace Toolkit.Foundation; -public record SelectionEventArgs(TValue? Value); +public record SelectionEventArgs(TValue? Value); \ No newline at end of file diff --git a/Toolkit.Foundation/Subscription.cs b/Toolkit.Foundation/Subscription.cs index 02e06a1..3517d63 100644 --- a/Toolkit.Foundation/Subscription.cs +++ b/Toolkit.Foundation/Subscription.cs @@ -49,7 +49,6 @@ public class Subscription(SubscriptionCollection subscriptions, } } - private void RemoveSubscriber(object subscriber, string key) { diff --git a/Toolkit.Foundation/Toolkit.Foundation.csproj b/Toolkit.Foundation/Toolkit.Foundation.csproj index 991be27..e30db04 100644 --- a/Toolkit.Foundation/Toolkit.Foundation.csproj +++ b/Toolkit.Foundation/Toolkit.Foundation.csproj @@ -9,7 +9,7 @@ - - + + diff --git a/Toolkit.Foundation/ValidationEventArgs.cs b/Toolkit.Foundation/ValidationEventArgs.cs index e225895..2e19125 100644 --- a/Toolkit.Foundation/ValidationEventArgs.cs +++ b/Toolkit.Foundation/ValidationEventArgs.cs @@ -1,3 +1,3 @@ namespace Toolkit.Foundation; -public record ValidationEventArgs(TValue Value); +public record ValidationEventArgs(TValue Value); \ No newline at end of file diff --git a/Toolkit.Foundation/ValueStore.cs b/Toolkit.Foundation/ValueStore.cs index 0c1c6db..d7b3707 100644 --- a/Toolkit.Foundation/ValueStore.cs +++ b/Toolkit.Foundation/ValueStore.cs @@ -6,4 +6,4 @@ public class ValueStore : public T? Value { get; private set; } public void Set(T value) => Value = value; -} +} \ No newline at end of file diff --git a/Toolkit.UI.Avalonia/AttachedBehaviour.cs b/Toolkit.UI.Avalonia/AttachedBehaviour.cs index b343d5c..8454219 100644 --- a/Toolkit.UI.Avalonia/AttachedBehaviour.cs +++ b/Toolkit.UI.Avalonia/AttachedBehaviour.cs @@ -9,4 +9,4 @@ public class AttachedBehaviour : Trigger Interaction.ExecuteActions(AssociatedObject, Actions, null); base.OnAttachedToVisualTree(); } -} +} \ No newline at end of file diff --git a/Toolkit.UI.Avalonia/AttachedEventTriggerBehaviour.cs b/Toolkit.UI.Avalonia/AttachedEventTriggerBehaviour.cs index 8c47319..d6c9119 100644 --- a/Toolkit.UI.Avalonia/AttachedEventTriggerBehaviour.cs +++ b/Toolkit.UI.Avalonia/AttachedEventTriggerBehaviour.cs @@ -21,14 +21,13 @@ public class AttachedEventTriggerBehaviour : Trigger { if (AssociatedObject is Interactive interactive) { - interactive.AddHandler(RoutedEvent, (object sender, RoutedEventArgs args) => { - + interactive.AddHandler(RoutedEvent, (object sender, RoutedEventArgs args) => + { Interaction.ExecuteActions(AssociatedObject, Actions, null); - }); } } base.OnAttached(); } -} +} \ No newline at end of file diff --git a/Toolkit.UI.Avalonia/InvokeNavigationViewItemAction.cs b/Toolkit.UI.Avalonia/InvokeNavigationViewItemAction.cs index db8f831..393791c 100644 --- a/Toolkit.UI.Avalonia/InvokeNavigationViewItemAction.cs +++ b/Toolkit.UI.Avalonia/InvokeNavigationViewItemAction.cs @@ -43,4 +43,4 @@ public class InvokeNavigationViewItemAction : return true; } -} +} \ No newline at end of file diff --git a/Toolkit.UI.Avalonia/ItemInvokedEventArgs.cs b/Toolkit.UI.Avalonia/ItemInvokedEventArgs.cs index d15588c..58d809e 100644 --- a/Toolkit.UI.Avalonia/ItemInvokedEventArgs.cs +++ b/Toolkit.UI.Avalonia/ItemInvokedEventArgs.cs @@ -2,8 +2,7 @@ namespace Toolkit.UI.Avalonia; -public class ItemInvokedEventArgs : +public class ItemInvokedEventArgs : RoutedEventArgs { - -} +} \ No newline at end of file diff --git a/Toolkit.UI.Avalonia/NavigateRegionAction.cs b/Toolkit.UI.Avalonia/NavigateRegionAction.cs index cd103e2..b497ac0 100644 --- a/Toolkit.UI.Avalonia/NavigateRegionAction.cs +++ b/Toolkit.UI.Avalonia/NavigateRegionAction.cs @@ -21,19 +21,20 @@ public class NavigateRegionAction : [Content] public ActionCollection Actions => actions ??= []; + public string Name { get => GetValue(NameProperty); set => SetValue(NameProperty, value); } - public object? Execute(object? sender, + public object? Execute(object? sender, object? parameter) { if (sender is Control control) { if (control.DataContext is IObservableViewModel observableViewModel) - { + { if (observableViewModel.Provider.GetRequiredService() is INavigationRegion navigationRegion) { navigationRegion.Register(Name, sender); @@ -44,4 +45,4 @@ public class NavigateRegionAction : return true; } -} +} \ No newline at end of file diff --git a/Toolkit.UI.Avalonia/NavigationViewItemExtension.cs b/Toolkit.UI.Avalonia/NavigationViewItemExtension.cs index 125b4f6..e2ee3bc 100644 --- a/Toolkit.UI.Avalonia/NavigationViewItemExtension.cs +++ b/Toolkit.UI.Avalonia/NavigationViewItemExtension.cs @@ -11,8 +11,8 @@ public class NavigationViewItemExtension AvaloniaProperty.RegisterAttached("IsItemClickEnabled", typeof(NavigationViewItemExtension), false); - public static readonly RoutedEvent ItemClickEvent = - RoutedEvent.Register("ItemClick", + public static readonly RoutedEvent ItemClickEvent = + RoutedEvent.Register("ItemClick", RoutingStrategies.Bubble, typeof(NavigationViewItemExtension)); static NavigationViewItemExtension() @@ -20,7 +20,7 @@ public class NavigationViewItemExtension IsItemClickEnabledProperty.Changed.AddClassHandler(OnIsItemClickEnabledPropertyChanged); } - private static void OnIsItemClickEnabledPropertyChanged(NavigationViewItem sender, + private static void OnIsItemClickEnabledPropertyChanged(NavigationViewItem sender, AvaloniaPropertyChangedEventArgs args) { bool TrySetupNavigationView() @@ -43,7 +43,7 @@ public class NavigationViewItemExtension } if (!TrySetupNavigationView()) - { + { void OnAttachedToVisualTree(object? _, VisualTreeAttachmentEventArgs __) { sender.AttachedToVisualTree -= OnAttachedToVisualTree; @@ -57,12 +57,12 @@ public class NavigationViewItemExtension public static bool GetIsItemClickEnabled(NavigationViewItem element) => element.GetValue(IsItemClickEnabledProperty); - public static void SetIsItemClickEnabled(NavigationViewItem element, bool value) => + public static void SetIsItemClickEnabled(NavigationViewItem element, bool value) => element.SetValue(IsItemClickEnabledProperty, value); - public static void AddItemClickHandler(NavigationViewItem element, EventHandler handler) => + public static void AddItemClickHandler(NavigationViewItem element, EventHandler handler) => element.AddHandler(ItemClickEvent, handler); public static void RemoveItemClickHandler(NavigationViewItem element, EventHandler handler) => element.RemoveHandler(ItemClickEvent, handler); -} +} \ No newline at end of file diff --git a/Toolkit.UI.Controls.Avalonia/ContentDialog/ContentDialog.axaml b/Toolkit.UI.Controls.Avalonia/ContentDialog/ContentDialog.axaml deleted file mode 100644 index b7cc4ce..0000000 --- a/Toolkit.UI.Controls.Avalonia/ContentDialog/ContentDialog.axaml +++ /dev/null @@ -1,357 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -