Skip to content

Commit

Permalink
chore: update samples
Browse files Browse the repository at this point in the history
  • Loading branch information
dansiegel committed Sep 4, 2023
1 parent e4a9f09 commit 0e6147f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 13 deletions.
1 change: 0 additions & 1 deletion e2e/Forms/src/HelloRegions/RegionDemoModule.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System;
using HelloRegions.ViewModels;
using HelloRegions.Views;
using Prism.Ioc;
Expand Down
4 changes: 1 addition & 3 deletions e2e/Forms/src/HelloRegions/ViewModels/RegionDemoBase.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
using System;
using Prism.Commands;
using Prism.Mvvm;
using Prism.Navigation;
using Prism.Navigation.Regions;
using Prism.Navigation.Regions.Navigation;

namespace HelloRegions.ViewModels
{
Expand All @@ -26,7 +24,7 @@ private void Navigate(string target)
_regionManager.RequestNavigate(RegionName, target, NavigationCallback);
}

private void NavigationCallback(IRegionNavigationResult result)
private void NavigationCallback(NavigationResult result)
{

}
Expand Down
12 changes: 6 additions & 6 deletions e2e/Forms/src/HelloRegions/ViewModels/ViewModelBase.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using Prism.Commands;
using Prism.Mvvm;
using Prism.Navigation.Regions.Navigation;
using Prism.Navigation.Regions;

namespace HelloRegions.ViewModels
{
Expand Down Expand Up @@ -38,28 +38,28 @@ public bool IsActive
set => SetProperty(ref _isActive, value, OnIsActiveChanged);
}

private INavigationContext _context;
private INavigationContext Context
private NavigationContext _context;
private NavigationContext Context
{
get => _context;
set => SetProperty(ref _context, value);
}

public bool IsNavigationTarget(INavigationContext navigationContext)
public bool IsNavigationTarget(NavigationContext navigationContext)
{
Console.WriteLine($"{GetType().Name} IsNavigationTarget called");
var lookingFor = navigationContext.NavigatedName();
return _contextName == lookingFor;
}

public void OnNavigatedFrom(INavigationContext navigationContext)
public void OnNavigatedFrom(NavigationContext navigationContext)
{
Context = navigationContext;
Console.WriteLine($"{GetType().Name} NavigatedFrom");
}

private string _contextName;
public void OnNavigatedTo(INavigationContext navigationContext)
public void OnNavigatedTo(NavigationContext navigationContext)
{
Context = navigationContext;
_contextName = navigationContext.NavigatedName();
Expand Down
3 changes: 1 addition & 2 deletions e2e/Uno/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<Project ToolsVersion="15.0">
<Import Project="..\..\src\Prism.Core\build\Prism.Uno.WinUI.targets" />
<Import Project="..\..\src\Uno\Prism.Uno\build\Prism.Uno.WinUI.targets" />
<Import Project="..\..\src\Prism.Core\build\Package.targets" />
</Project>
2 changes: 1 addition & 1 deletion e2e/Uno/HelloWorld/Views/Shell.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
x:Class="HelloWorld.Views.Shell"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:pr="using:Prism.Regions"
xmlns:pr="using:Prism.Navigation.Regions"
xmlns:pvm="using:Prism.Mvvm"
pvm:ViewModelLocator.AutowireViewModel="true"
xmlns:local="using:HelloWorld.Views"
Expand Down

0 comments on commit 0e6147f

Please sign in to comment.