Improve vault navifaiton
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.Primitives;
|
||||
using FluentAvalonia.UI.Media.Animation;
|
||||
using FluentAvalonia.UI.Navigation;
|
||||
using System.Reflection;
|
||||
using Toolkit.Foundation;
|
||||
@@ -183,7 +184,7 @@ public class FrameHandler(INavigationContext navigationContext) :
|
||||
navigationContext.Set(control);
|
||||
|
||||
NavigatedTo(args.Sender, control);
|
||||
frame.NavigateFromObject(control);
|
||||
frame.NavigateFromObject(control, new FrameNavigationOptions { TransitionInfoOverride = new SuppressNavigationTransitionInfo() });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
namespace Toolkit.Foundation;
|
||||
|
||||
public record Activated;
|
||||
@@ -0,0 +1,3 @@
|
||||
namespace Toolkit.Foundation;
|
||||
|
||||
public record Deactivated;
|
||||
@@ -8,4 +8,4 @@ public interface IActivated
|
||||
public interface IActivated<TResult>
|
||||
{
|
||||
Task Activated(TResult result);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace Toolkit.Foundation;
|
||||
|
||||
public record Selected<TValue>(TValue Value);
|
||||
|
||||
public record Selected
|
||||
{
|
||||
public static Selected<TValue> As<TValue>(TValue value) =>
|
||||
new(value);
|
||||
|
||||
public static Selected<TValue> As<TValue>() where TValue : new() =>
|
||||
new(new TValue());
|
||||
}
|
||||
+1
-3
@@ -2,14 +2,12 @@
|
||||
using Avalonia.Threading;
|
||||
using Avalonia.Xaml.Interactivity;
|
||||
using System.Collections;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Collections.Specialized;
|
||||
using Toolkit.Foundation;
|
||||
using Toolkit.UI.Controls.Avalonia;
|
||||
|
||||
namespace Toolkit.UI.Avalonia;
|
||||
|
||||
public class SelectNavigationViewItemAction :
|
||||
public class InvokeNavigationViewItemAction :
|
||||
AvaloniaObject,
|
||||
IAction
|
||||
{
|
||||
Reference in New Issue
Block a user