Files
Wino-Mail/Wino.Mail/Activation/DefaultActivationHandler.cs

23 lines
729 B
C#
Raw Normal View History

2024-04-18 01:44:37 +02:00
using System.Threading.Tasks;
using Windows.ApplicationModel.Activation;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media.Animation;
using Wino.Views;
2025-02-16 11:54:23 +01:00
namespace Wino.Activation;
internal class DefaultActivationHandler : ActivationHandler<IActivatedEventArgs>
2024-04-18 01:44:37 +02:00
{
2025-02-16 11:54:23 +01:00
protected override Task HandleInternalAsync(IActivatedEventArgs args)
2024-04-18 01:44:37 +02:00
{
2025-02-16 11:54:23 +01:00
(Window.Current.Content as Frame).Navigate(typeof(AppShell), null, new DrillInNavigationTransitionInfo());
2025-02-16 11:35:43 +01:00
2025-02-16 11:54:23 +01:00
return Task.CompletedTask;
}
2025-02-16 11:54:23 +01:00
// Only navigate if Frame content doesn't exist.
protected override bool CanHandleInternal(IActivatedEventArgs args)
=> (Window.Current?.Content as Frame)?.Content == null;
2024-04-18 01:44:37 +02:00
}