Improve navigation

This commit is contained in:
TheXamlGuy
2024-05-16 22:30:01 +01:00
parent 7f3c4c53cc
commit 85a14a8259
9 changed files with 53 additions and 38 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ public class ContentControlHandler :
{
public async Task Handle(NavigateEventArgs<ContentControl> args)
{
if (args.Context is ContentControl contentControl)
if (args.Region is ContentControl contentControl)
{
if (args.Template is Control control)
{
+1 -1
View File
@@ -8,7 +8,7 @@ public class ContentDialogHandler(IDispatcher dispatcher) :
{
public async Task Handle(NavigateEventArgs<ContentDialog> args)
{
if (args.Context is ContentDialog contentDialog)
if (args.Region is ContentDialog contentDialog)
{
contentDialog.DataContext = args.Content;
+1 -1
View File
@@ -14,7 +14,7 @@ public class FrameHandler :
{
public Task Handle(NavigateEventArgs<Frame> args)
{
if (args.Context is Frame frame)
if (args.Region is Frame frame)
{
frame.NavigationPageFactory ??= new NavigationPageFactory();
if (args.Template is Control control)