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
1
vote
1 answer

Navigation between lazy loaded modules with Prism and WPF

Hello I'm trying to setup an architecture where only one module gets booted when the app is launched. Then I'd like to lazy load other modules based on the user's actions. To achieve this in my app.xaml.cs I have one module loaded at bootstrap time…
nomadev
  • 162
  • 1
  • 12
1
vote
1 answer

Using Prism IEventAggregator cross platform

We have some library project C# code that needs to signal events to the main WPF application. We would like to reuse the library code (.NET core 3.1 based) on Mac and Linux. If we use IEventAggregator in the library code, could this be reused in a…
tech74
  • 1,609
  • 1
  • 20
  • 39
1
vote
1 answer

Error with CollectionView RemainingItemsThreshholdReached Command

I use Prism MVVM in my app. So here is my XAML code IsRefreshing="{Binding IsRefreshing}" Command="{Binding RefreshCommand}">
1
vote
1 answer

MVVM: Should I check my "CanExecute" method from within my Execute methods?

I understand the use of CanExecute() and Execute(), but I'm wondering about the following scenario: public class MyViewModel : NotificationObject { public MyViewModel() { FooCommand = new DelegateCommand(DoFoo, CanDoFoo); } …
myermian
  • 31,823
  • 24
  • 123
  • 215
1
vote
2 answers

How to reserve registered service usage with passing params in constructor?

I am a newbie to OOP and IOC container. I need to understand how to use depency injection. My app's simple structure is as below. The code below belongs to CacheService: using Akavache; public class CacheService : ICacheService { …
Kerberos
  • 1,228
  • 6
  • 24
  • 48
1
vote
1 answer

IUnity Container RegisterTypeforNavigation is not working in Prism 7

I am having this problem when I installed prism 7 SCS1929 'IUnityContainer' does not contain a definition for 'RegisterTypeForNavigation' and the best extension method overload 'UnityExtensions.RegisterTypeForNavigation(IUnityContainer, string)'…
1
vote
1 answer

Prism 4.1 How to loading modules with directory scan andapply them to mvvm pattern for navigation

In prism 4.1 I want to use module loading and build my project using mvvm. Now I register the module using directory scanning,but navigation is not possible in the view model the code for the module [Module(ModuleName = "ModuleA", OnDemand =…
Mystline
  • 13
  • 3
1
vote
0 answers

Unable to create XAML array of views with mvvm:ViewModelLocator

I want to make a xamarin forms carousel view containing 2 custom views. I have this code:
Esteban Chornet
  • 928
  • 3
  • 14
  • 38
1
vote
1 answer

Pass two UIElements as CommandParameter

I have a Prism MVVM app, can easily pass one UIElement as a CommandParameter to ViewModel's Command. But now I want to pass two UIElements. Using this XAML:
Alexey Titov
  • 235
  • 2
  • 9
1
vote
2 answers

does Prism support compiled binding

It's not clear to me if Compiled binding is supported in prism. Its an extremely good feature that avoids reflection and speeds up the load of the page. Hopefully either Brian Lagunas or Dan Siegel will answer this one. Can somebody clarify if…
Ted
  • 13
  • 4
1
vote
1 answer

Xamarin.Forms MasterDetail page NavBar customization

I'm in need of a large dose of help for an issue with the MasterDetail page in Xamarin.Forms. What I'm trying to do is, very simply, to customize the NavigationBar's background to use a gradient. My setup is a Xamarin.Forms app with Prism, where I…
1
vote
1 answer

AutoProperties doesn't work with DelegateCommand.ObservesCanExecute in prism?

There is something under the hood that I don't understand with ObservesCanExecute on DelegateCommand in prism. It has something to see with AutoProperties ... I think I have a View with a button which is bound to a DelegateCommand in my…
Belight
  • 205
  • 2
  • 14
1
vote
1 answer

Dependency injection using PRISM Xamarin Forms doesn't work

I have a problem with dependency injection in my project. I use PRISM framework in my project and I chose Ioc container when create it. Link -> https://github.com/blackpantific/InstagroomEX In my app.xaml file I associate the class and…
1
vote
1 answer

views navigation prism

Hey guys, I'm using prism 4 to implement my presentation, the thing is that i'm using view that contains region,now I want to navigate to other instance of the view under the same scope so I set the KeepAlive property of the view to false so that in…
Eran
  • 79
  • 8
1
vote
1 answer

Using the services that registered in module at the shell viewmodel at the initialize time (WPF, Prism)

I'm trying to using prism to build my application, and I faced an exception but I have no idea to solve this. In the app.xaml.cs file, I override CreateShell() method to create the shell used as place holder. public partial class App { protected…