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
2 answers

Set focus on Entry field in Xamarin.Forms MVVM (Prism)

I'm using Xamarin.Forms and Prism to create my mobile app. I have a screen with 2 entries. When entering the screen, I'd like to set the focus on the first entry. Then after the user entered data in this entry and validated it, I'd like to set the…
YoZ
  • 23
  • 1
  • 7
1
vote
2 answers

WPF PRISM 7 Login Window Before Main Window

I am new to WPF/Prism and I am trying to do the following: I need to load a Login View ( windows or user control) before launching my Main Window. And after successful login, remove the Login view and go to the Main Mindow. I have looked at several…
ArHe
  • 11
  • 3
1
vote
1 answer

How to create view-model of prism when needed?

I really made a search for this topic and did not find anything, and because of that, I am asking the question here. I have a WPF application with Prism installed. I have wired the view-model with the view automatically by name…
Hakan Fıstık
  • 16,800
  • 14
  • 110
  • 131
1
vote
1 answer

Load Region On Application Startup

I'm having some trouble gaining a working understanding of how Region Navigation works in Prism. I'm trying to create an MVVM based app that loads a main window, and displays a view generated by a login form. After the login form is submitted, I…
1
vote
0 answers

Second Prism region stops working once its contained in a different control

I've got a problem with a Prism 7.1, desktop WPF application in which I use Navigation to load a view into one region ("Main") and an associated set of tools into a second region ("Tools"). The short version is that I re-did the layout of the…
Joe
  • 5,394
  • 3
  • 23
  • 54
1
vote
2 answers

New shell/window in Prism/WPF shows wrong view

Inspired by this answer, I created a general purpose Shell (Prism, WPF) like this:
Robert Hegner
  • 9,014
  • 7
  • 62
  • 98
1
vote
1 answer

Unity container injection in my view models

I am a newcomer to C# / .Net / Prism / WPF / DevExpress and started to work on a big project in my company. As I am starting a bit late in the project, a lot of code was already produced and I stumble upon code like this very often: public class…
Laurent Michel
  • 1,069
  • 3
  • 14
  • 29
1
vote
1 answer

Initialize object and share it between modules

i have multiple module(every module has his own project) and i try to share a object between each module. The object is on the UserViewModel Module initialized but not on the other modules (Only after the property changed trigger). I tried it with…
1
vote
1 answer

Add DryIoc adapter for MS DI to Prism DryIoc in xamarin forms

I'm trying to add DryIoc adapter for MS DI to Xamarin.Forms shared library (.net standard class library) but I couldn't yet. When I run the project I get this error 05-20 11:49:29.528 D/ ( 3402): HostConnection::get() New Host Connection…
Mauro Petrini
  • 341
  • 4
  • 19
1
vote
0 answers

How to modify specific ListView items to post back to db - MVVM

I have ListView with Button showing status A(Absent), P(Present) and L(Late) for each item. On Button click status Text getting changed P to A, A to L. When changing status of any item, I have to change AttendanceId, AttendanceTypeStatusCD,…
R15
  • 13,982
  • 14
  • 97
  • 173
1
vote
2 answers

How to use prism/unity for vspackage development since Bootstrapper is obsolete?

I create wpf application with Prism modularity. Now i'd like to create Visual Studio plugin(vspackage) while reusing UI part from previous app, aka using appropriate module from this app. I thought i could use Unity.Bootstrapper for it, but it seems…
1
vote
2 answers

MEF assembly loading declarations

In Prism, I have the ability to declare from my dynamically loaded assembly how I expect the loading assembly to initialize me and when. That is, I could place the following class attribute: [ModuleExport(typeof(MyModule), InitializationMode =…
pinvoke
  • 331
  • 1
  • 3
  • 10
1
vote
2 answers

How to fix an empty listview in xamarin.forms mobile app page

I am learning to use Xamarin.Forms with prism, I want to populate a list view with a specific item from each object in my list. My list view shows up empty, but I don't see any errors. I have tried using binding to bind to the Name variables in my…
Skuffd
  • 334
  • 1
  • 4
  • 16
1
vote
1 answer

What is difference between Container.Resolve() and new View()?

Now I'm practicing Prism with "Prism-Samples-Wpf" in Github. (https://github.com/PrismLibrary/Prism-Samples-Wpf/tree/master/06-ViewActivationDeactivation) This code is part of MainWindow.xaml.cs public partial class MainWindow : Window { …
Max Lee
  • 241
  • 1
  • 5
  • 14
1
vote
2 answers

Non-Generic CompositePresentationEvent and EventSubscription?

I am trying to create a TPayLoad-free CompositePresentationEvent, that its delegate is parameterless. I want to have a global application event that takes no parameters such as UserLoggedInEvent, UserGotIdleEvent etc. etc. How should this be done…
Shimmy Weitzhandler
  • 101,809
  • 122
  • 424
  • 632