演示如何在WPF中使用各种Prism功能的示例。如果您刚开始使用Prism,建议您从第一个示例开始,然后按顺序(按顺序)从列表中移出。每个样本都基于先前样本的概念。演示如何在WPF中使用各种Prism功能的示例。如果您刚开始使用Prism,建议您从第一个示例开始,然后按顺序(按顺序)从列表中移出。每个样本都基于先前样本的概念。
官方例子是使用Prism.Unity,VS2019 ,本文中的例子是使用Prism.DryIOC,VS2017,.net4.8,希望对大家学习Prism有所帮助。
Topic | Description |
---|---|
Bootstrapper and the Shell | Create a basic bootstrapper and shell |
Regions | Create a region |
Custom Region Adapter | Create a custom region adapter for the StackPanel |
View Discovery | Automatically inject views with View Discovery |
View Injection | Manually add and remove views using View Injection |
View Activation/Deactivation | Manually activate and deactivate views |
Modules with App.config | Load modules using an App.config file |
Modules with Code | Load modules using code |
Modules with Directory | Load modules from a directory |
Modules loaded manually | Load modules manually using the IModuleManager |
ViewModelLocator | using the ViewModelLocator |
ViewModelLocator - Change Convention | Change the ViewModelLocator naming conventions |
ViewModelLocator - Custom Registrations | Manually register ViewModels for specific views |
DelegateCommand | Use DelegateCommand and DelegateCommand<T> |
CompositeCommands | Learn how to use CompositeCommands to invoke multiple commands as a single command |
IActiveAware Commands | Make your commands IActiveAware to invoke only the active command |
Event Aggregator | Using the IEventAggregator |
Event Aggregator - Filter Events | Filtering events when subscribing to events |
RegionContext | Pass data to nested regions using the RegionContext |
Region Navigation | See how to implement basic region navigation |
Navigation Callback | Get notifications when navigation has completed |
Navigation Participation | Learn about View and ViewModel navigation participation with INavigationAware |
Navigate to existing Views | Control view instances during navigation |
Passing Parameters | Pass parameters from View/ViewModel to another View/ViewModel |
Confirm/cancel Navigation | Use the IConfirmNavigationReqest interface to confirm or cancel navigation |
Controlling View lifetime | Automatically remove views from memory with IRegionMemberLifetime |
Navigation Journal | Learn how to use the Navigation Journal |
Interactivity - NotificationRequest | Learn how to show popups using an InteractionRequest |
Interactivity - ConfirmationRequest | Learn how to prompt a confirmation dialog using a ConfirmationRequest |
Interactivity - Custom Content | Learn how to use your own content for a dialog shown with InteractionRequest |
Interactivity - Custom Request | Create your own custom request to use with an InteractionRequest |
Interactivity - InvokeCommandAction | Invoke commands in response to any event |