Improved event naming
This commit is contained in:
@@ -8,7 +8,7 @@ namespace Toolkit.Avalonia;
|
||||
public class ClassicDesktopStyleApplicationHandler :
|
||||
INavigateHandler<IClassicDesktopStyleApplicationLifetime>
|
||||
{
|
||||
public Task Handle(Navigate<IClassicDesktopStyleApplicationLifetime> args,
|
||||
public Task Handle(NavigateEventArgs<IClassicDesktopStyleApplicationLifetime> args,
|
||||
CancellationToken cancellationToken = default)
|
||||
{
|
||||
if (Application.Current?.ApplicationLifetime is
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Toolkit.Avalonia;
|
||||
public class ContentControlHandler :
|
||||
INavigateHandler<ContentControl>
|
||||
{
|
||||
public async Task Handle(Navigate<ContentControl> args,
|
||||
public async Task Handle(NavigateEventArgs<ContentControl> args,
|
||||
CancellationToken cancellationToken)
|
||||
{
|
||||
if (args.Context is ContentControl contentControl)
|
||||
@@ -27,7 +27,7 @@ public class ContentControlHandler :
|
||||
|
||||
if (content is IActivated activated)
|
||||
{
|
||||
await activated.Activated();
|
||||
await activated.OnActivated();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class ContentControlHandler :
|
||||
{
|
||||
if (content is IDeactivated deactivated)
|
||||
{
|
||||
await deactivated.Deactivated();
|
||||
await deactivated.OnDeactivated();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Toolkit.Avalonia;
|
||||
public class ContentDialogHandler(IDispatcher dispatcher) :
|
||||
INavigateHandler<ContentDialog>
|
||||
{
|
||||
public async Task Handle(Navigate<ContentDialog> args,
|
||||
public async Task Handle(NavigateEventArgs<ContentDialog> args,
|
||||
CancellationToken cancellationToken)
|
||||
{
|
||||
if (args.Context is ContentDialog contentDialog)
|
||||
@@ -94,7 +94,7 @@ public class ContentDialogHandler(IDispatcher dispatcher) :
|
||||
|
||||
if (content is IActivated activated)
|
||||
{
|
||||
await activated.Activated();
|
||||
await activated.OnActivated();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ public class ContentTemplate :
|
||||
|
||||
if (content is IActivated activated)
|
||||
{
|
||||
await activated.Activated();
|
||||
await activated.OnActivated();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -47,7 +47,7 @@ public class ContentTemplate :
|
||||
{
|
||||
if (content is IDeactivated deactivated)
|
||||
{
|
||||
await deactivated.Deactivated();
|
||||
await deactivated.OnDeactivated();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ public class FrameHandler :
|
||||
INavigateHandler<Frame>,
|
||||
INavigateBackHandler<Frame>
|
||||
{
|
||||
public Task Handle(Navigate<Frame> args,
|
||||
public Task Handle(NavigateEventArgs<Frame> args,
|
||||
CancellationToken cancellationToken)
|
||||
{
|
||||
if (args.Context is Frame frame)
|
||||
@@ -43,7 +43,7 @@ public class FrameHandler :
|
||||
{
|
||||
if (content is IDeactivating deactivating)
|
||||
{
|
||||
await deactivating.Deactivating();
|
||||
await deactivating.OnDeactivating();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -72,7 +72,7 @@ public class FrameHandler :
|
||||
{
|
||||
if (content is IDeactivated deactivated)
|
||||
{
|
||||
await deactivated.Deactivated();
|
||||
await deactivated.OnDeactivated();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -119,7 +119,7 @@ public class FrameHandler :
|
||||
|
||||
if (content is IActivated activated)
|
||||
{
|
||||
await activated.Activated();
|
||||
await activated.OnActivated();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -136,7 +136,7 @@ public class FrameHandler :
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public Task Handle(NavigateBack<Frame> args,
|
||||
public Task Handle(NavigateBackEventArgs<Frame> args,
|
||||
CancellationToken cancellationToken = default)
|
||||
{
|
||||
if (args.Context is Frame frame)
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Toolkit.Avalonia;
|
||||
public class SingleViewApplicationHandler :
|
||||
INavigateHandler<ISingleViewApplicationLifetime>
|
||||
{
|
||||
public Task Handle(Navigate<ISingleViewApplicationLifetime> args,
|
||||
public Task Handle(NavigateEventArgs<ISingleViewApplicationLifetime> args,
|
||||
CancellationToken cancellationToken = default)
|
||||
{
|
||||
if (Application.Current?.ApplicationLifetime is
|
||||
|
||||
Reference in New Issue
Block a user