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

How to register service with the same instance in Prism with Unity?

I've a Prism Module (implementing IModule). In the RegisterTypes(IContainerRegistry containerRegistry), I need to say that ONE instance of the class A is the one to return when requesting the interfaces IA and IAprime: public void…
J4N
  • 19,480
  • 39
  • 187
  • 340
1
vote
1 answer

Prism: View is not updated after setting value in ViewModel?

I was unable to bind the values to View from the ViewModel, I can see the values are setting (ServiceList) Here are the Xaml XAML:
1
vote
2 answers

Prism's INavigationAware methods not fired in TabbedPage when tapping tab icons

I'm using Prism.Unity.Forms nuget version 7.2.0.1347-pre. I have a tabbed page (named MainPage) like below: In the App.xaml.cs I…
VahidShir
  • 2,066
  • 2
  • 17
  • 27
1
vote
1 answer

What causes my navigation to fail in Xamarin with Prism?

With Xamarin.Forms 4.0 and Prism 7.1.04 with AutoFac, I cannot navigate to the last page in my stack. I have registered all of my pages in App.xaml.cs. Navigation up to the last page works successfully. When NavigationAsync is called for this last…
Blanthor
  • 2,568
  • 8
  • 48
  • 66
1
vote
2 answers

Xamarin Forms - Save and Retrieve Prism Navigation Stack with ViewModels

I am implementing a Xamarin Forms Mobile application using Prism for Navigation. Is there a way to retrieve the complete Navigation Stack along with the View Models from Prism? The requirement is, if the user is in the middle of a workflow and the…
FRANCIS
  • 11
  • 2
1
vote
1 answer

WPF Prism.Unity - how to construct a ViewModel using named dependency injection

Using Prism 7.1, I can register two named dependencies: containerRegistry.Register("One"); containerRegistry.Register("Two"); Now - how can I use any of them in…
Alexey Titov
  • 235
  • 2
  • 9
1
vote
2 answers

Silverlight out-of-browser vs multi-targeting WPF

I'm starting a new project that is primarily a silverlight web application. However, it also needs to run as a stand-alone desktop application. I'm planning on basing the project on Prism 4.0. It provides guidance around sharing code between…
Matt Johnson-Pint
  • 230,703
  • 74
  • 448
  • 575
1
vote
0 answers

How to use a bind property as a parameter in a View Model method

I have a view model in Xamarin Forms using Prism framework. I have a lot of UI elements that have, each, lots of bind properties in my view model that have similar behaviour. After a command action, I want to perform exactly the same logic for each…
jcasas
  • 305
  • 4
  • 12
1
vote
1 answer

Why my Subscribe method is not called when using Prism EventAggregator?

I am learning Prism. Few hours already I am facing a problem, when subscribing to the event, the subscription method is not called. I am using Prism and Autofac. In the simplified example below, in MainViewModel Publish("dupa"); event is called in…
bakunet
  • 197
  • 1
  • 12
1
vote
1 answer

WPF DataTemplate / DataTemplateSelector -- Best approach for a ViewModel used by 2 different Views?

Basically, I have the following scenario: ViewModel: FooViewModel : BaseViewModel, BarViewModel : BaseViewModel Views: MainView, FooView, BarView Right now I "inject" the view and set the DataContext using DataTemplate and DataTemplateSelector.…
myermian
  • 31,823
  • 24
  • 123
  • 215
1
vote
0 answers

How to Raise Event Item Clicked of a ListView that exists inside another ListView

I'm creating a Prism Xamarin Form app, in my page I have nested listviews (4 levels), the problem is that I'm not able to raise event when I tap on an item inside second, third and fourth level listviews, the event is working only for the top level…
Fadl Assaad
  • 99
  • 13
1
vote
1 answer

Prism detecting if page is modal programmatically and go back

I am implementing a feature using "connectivity" from essentials that when the app goes "offline" no wifi etc.. it navigates to a specific page. It works in most cases however if I set the phone on "Airplane Mode" when I am on a modal page it does…
developer9969
  • 4,628
  • 6
  • 40
  • 88
1
vote
1 answer

How to create multiple distinct shells

I would like to write a multi-window WPF application using Prism 7.1 with Unity. The main window is supposed to host some buttons, each of which opens a new window. Is there a built-in way in Prism/Unity that will open/create a window only once and…
Markus Nißl
  • 371
  • 3
  • 10
1
vote
1 answer

Binding default values on Picker and DatePicker when ViewModel loading

I want to set selected date on DatePicker and Selected item on Picker when on when ViewModel class loading. How I am doing it public override void OnNavigatedTo(INavigationParameters parameters) { base.OnNavigatedTo(parameters); var objL =…
R15
  • 13,982
  • 14
  • 97
  • 173
1
vote
1 answer

C# Prism navigationProblem

I have two regions. A navigation region and a main region. My navigation region contains two buttons which call the RequestNavigate method. The first button loads a view without any…
Cr3at0rX
  • 199
  • 1
  • 11