Improve navigation
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user