Questions tagged [prism]

Prism is a framework for building loosely coupled, maintainable, and testable XAML applications in WPF, Windows 10 UWP, and Xamarin Forms.

Prism is an open source framework for building loosely coupled, maintainable, and testable XAML applications in WPF, Windows 10 UWP, and Xamarin Forms.

Prism provides an implementation of a collection of design patterns that are helpful in writing well-structured and maintainable XAML applications, including MVVM, dependency injection, commands, event aggregation, and others.

Prism's core functionality is a shared code base in a Portable Class Library targeting these platforms. Those things that need to be platform specific are implemented in the respective libraries for the target platform.

Prism also provides great integration of these patterns with the target platform. For example, Prism for UWP and Xamarin Forms allows you to use an abstraction for navigation that is unit testable, but that layers on top of the platform concepts and APIs for navigation so that you can fully leverage what the platform itself has to offer, but done in the MVVM way.

For more information visit the project site https://github.com/PrismLibrary/Prism.

You can find the latest documentation here.

Samples

Some samples for using Prism with WPF, UWP and Xamarin Forms can be found here:

WPF

UWP

Xamarin Forms

4433 questions
14
votes
3 answers

Methods for composing configuration for composite applications (eg PRISM, MEF)

Frameworks such as PRISM and MEF make it very easy to design complex applications out of multiple, composable components. One common example of this is a plug-in architecture where an application shell can be dymanically reconfigured with plug-in UI…
Chris Ballard
  • 3,771
  • 4
  • 28
  • 40
14
votes
3 answers

WPF: Is Prism overkill for small apps?

If I don't split my app into different modules (otherwise I would argue that Prism would defo be the way to go) should I use Prism? I know that Prism gives a convenient implementation of ICommand (which I could do myself in a page of code) and gives…
Bob
  • 4,236
  • 12
  • 45
  • 65
14
votes
3 answers

New Prism Project - Use MEF or Unity?

I'm starting a new personal Prism 4 project. The Reference Implementation currently uses Unity. I'd like to know if I should use MEF instead, or just keep to Unity. I know a few discussions have mentioned that these two are different, and they do…
Jonas Arcangel
  • 2,085
  • 11
  • 55
  • 85
14
votes
3 answers

BindableBase vs INotifyChanged

Does anyone know if BindableBase is still a viable or should we stick with INotifyChanged events? It seems like BindableBase has lost its luster quickly. Thanks for any info you can provide.
ChiliYago
  • 11,341
  • 23
  • 79
  • 126
14
votes
2 answers

Get IOC container in a popup

I am using PRISM 5 in my WPF application. And the Shell view in my application has two regions, consider it as A and B.The region A contains a POPUP (PRISM 5 interactivity feature is used to show popup). The application is working when i create an…
Prasanth V J
  • 1,126
  • 14
  • 32
14
votes
2 answers

EventAggregator vs CompositeCommand

I worked my way through the Prism guidance and think I got a grasp of most of their communication vehicles. Commanding is very straightforward, so it is clear that the DelegateCommand will be used just to connect the View with its Model. It is…
Thorsten Lorenz
  • 11,781
  • 8
  • 52
  • 62
14
votes
2 answers

In Composite WPF (Prism), what is the difference between IRegion.Add and IRegionManager.RegisterViewWithRegion?

In Composite WPF (Prism), when adding modules to the IRegionManger collection, what is the difference between using IRegion.Add and IRegionManager.RegisterViewWithRegion? IRegion.Add public void Initialize() { …
Metro Smurf
  • 37,266
  • 20
  • 108
  • 140
14
votes
3 answers

Composite WPF (Prism) module resource data templates

Given that I have a shell application and a couple of separate module projects using Microsoft CompoisteWPF (Prism v2)... On receiving a command, a module creates a new ViewModel and adds it to a region through the region manager. var viewModel =…
Oll
  • 945
  • 1
  • 14
  • 23
14
votes
2 answers

Looking for Prism example of Modules loading themselves into a menu

Does anyone know of WPF code examples using Prism in which modules each register themselves as a menuitem in a menu within another module? (I've currently got an application which tries to do this with the EventAggregator, so one module listens for…
Edward Tanguay
  • 189,012
  • 314
  • 712
  • 1,047
14
votes
1 answer

How to enable a Button with its CanExecute method

I am developing an application in WPF using MVVM, but I am stuck with the ICommand objects. I have a windows which contains some buttons, so, I bind them to their respective ICommand in XAML as below:
13
votes
4 answers

Prism/MVVM (MEF/WPF): Exposing navigation [Menu's for example] from modules

I am starting my first foray into the world of Prism v4/MVVM with MEF & WPF. I have sucessfully built a shell and, using MEF, I am able to discover and initialise modules. I am however unsure as to the correct way to provide navigation to the views…
Martin Robins
  • 6,033
  • 10
  • 58
  • 95
13
votes
1 answer

Choosing Between Prism and Caliburn

I have been using Prism 2.0 for a personal project for a few months now. I have recently heard of Caliburn and am wondering if there are compelling reasons for me to consider that instead. I like Prism's dynamic module loading capability. I intend…
Jonas Arcangel
  • 2,085
  • 11
  • 55
  • 85
13
votes
2 answers

What's the best way to avoid memory leaks in WPF PRISM/MVVM application

I have a WPF application based on PRISM that utilizes the MVVM pattern. I have noticed that occasionally my view models, views and everything connected to them will hang around long after their intended lifespan. One leak involved subscribing to…
Ian Oakes
  • 10,153
  • 6
  • 36
  • 47
13
votes
4 answers

Creating objects using Unity Resolve with extra parameters

I'm using Prism, which gives be the nice Unity IoC container too. I'm new to the concept, so I haven't gotten my hands all around it yet. What I want to do now is to create an object using the IoC container, but passing an extra parameter too. Allow…
stiank81
  • 25,418
  • 43
  • 131
  • 202
13
votes
3 answers

How to change a WPF control's visibility from ViewModel

I've an WPF application where tried to implement MVVM pattern and Prism 2. I have a Usercontrol which has subscribed to an event fired from another Usercontrol. I would like to toggle visibility of few child elements in the subscribing control.…
Raj
  • 4,405
  • 13
  • 59
  • 74