Prism 5 legacy PDF

main
Yik Teng Hie 3 years ago
parent 40d86a807e
commit 795a180477

@ -13,11 +13,12 @@
## Migration Guides
- [Prism 4.1 to 5](https://learn.microsoft.com/en-us/previous-versions/msp-n-p/ff921144(v=pandp.40))
- `Microsoft.Practices.Prism.ViewModel` namespace deprecated. Please use `Microsoft.Practices.Prism.Mvvm`
- The `BindableBase` class replaces the `NotificationObject` class.
- The `BindableBase` class was added to simplify `INotifyPropertyChanged` interface.
- EventAggregator Namespace and API Changes. **NEW** `Prism.PubSubEvents` namespace
- Regions Namespace API Changes
- `UriQuery` class was replaced with the `NavigationParameters`
- Namespace changes
- Refer to [Prism 5 pdf](./legacy/Prism5forWPF.pdf) for legacy changes
```cs
using Microsoft.Practices.Prism.ViewModel;

@ -247,21 +247,21 @@ namespace MitechLib.Modules.PackagePage.Views
public class CarrierInfoViewModel : ViewModelBase, IHeaderInfoProvider<string>
{
// Step1
public IRegionManager RegionManager { get; }
private readonly IRegionManager regionManager;
// Step2
[ImportingConstructor]
public CarrierInfoViewModel(IRegionManager _regionManager)
{
//
RegionManager = _regionManager;
regionManager = _regionManager;
}
// Step3
private void OnExitCommand()
{
RegionManager.RequestNavigate(RegionNames.PackageMainViewRegion, new Uri("PackageMgmtView", UriKind.Relative));
regionManager.RequestNavigate(RegionNames.PackageMainViewRegion, new Uri("PackageMgmtView", UriKind.Relative));
}
}
```
Loading…
Cancel
Save