Click here to Skip to main content
15,892,298 members
Everything / PRISM

PRISM

PRISM

Great Reads

by Rubén Hinojosa Chapel
Prototype for a plugin architecture based on the Prism Library and the Modern UI for WPF (MUI) toolkit
by MatthewThomas
Adding design time support for regions in Prism 6
by User 271009
Microsoft patterns & practices Prism 4 library and guidance gives WPF and Silverlight developers a very solid foundation for creating business applications.
by FurqanSafdar
This tip and trick describes a way to make MahApps.Metro Flyouts work with a modular application sample in Prism Library.

Latest Articles

by Kenneth Haugland
Useful extension method for ViewModelFirst
by Illya Reznykov
Screen saver application written in WPF with Prism pattern
by Rubén Hinojosa Chapel
Prototype for a plugin architecture based on the Prism Library and the Modern UI for WPF (MUI) toolkit
by Chandrasekhar Telkapalli
Understanding the User Business Process,analysis on benefits of doing Automation and best approaches & practices in designing the solution

All Articles

Sort by Updated

PRISM 

9 Nov 2021 by DoingWork
Hi Friends I have 2 different user controls i.e. ViewAUserControl.xaml , and ViewBUserControl.xaml . These controls are added dynamically in dynamic tabItems where each tabItem contains any single userControl from availabe 2 UserControls, whom...
9 Nov 2021 by pszyjaciel
In the ViewAUserControl.xaml: xmlns:local="clr-namespace:WpfPractice.ViewModel" In the ViewBUserControl.xaml: ...
26 Mar 2021 by Programmer Decaf
I am very impressed into Prism Library's Modules. I am going to implement this module in my app which is based on Caliburn Library. Is there way to implement this module in Caliburn.Micro easily? What I have tried: I didn't do anything because...
14 Feb 2021 by Kenneth Haugland
Useful extension method for ViewModelFirst
29 Dec 2020 by rameshk553
I have a Prism DialogService to show a user control in a dialog box(with OK and Cancel buttons), and I use it this way private void AddProduct() { Product selectedProduct = null; _dialogService.ShowDialog("AddProduct", new...
29 Dec 2020 by Cp-Coder
This is not a direct reply to your question, but there is an easy way to do dialogs in Prism. Just create your dialog to your taste. Just do not new-up it like this: MyDialog dlg = new MyDialog(); This will violate MVVM prime directives. No....
20 Apr 2020 by nmeri17
I started getting the error above after refactoring the code by pulling out project child folders into the root of each project and renaming the namespaces to reflect this change. I've repeatedly set the main project containing the shell and bootstrapper as startup project but the solution...
1 Sep 2018 by Ian Bell, #2
It is not clear what your question is so perhaps you can provide an example of what you are trying to do. What exactly do you mean by "find the prism window"? If you are attempting to unit test the GUI (graphic user interface) then this is not what NUnit was designed for. If you are...
1 Sep 2018 by san2debug
Hi All, I have developed a sample WPF application using Prism 7.1 and I want to use a unit testing framework (NUnit) for testing my sample WPF application. What I have tried: I tried to do unit testing using a test project for a sample WPF application but I can't able to find the prism...
14 Aug 2018 by bluecomb
I’ve upgraded my project today to Prism 7.0.0 and Unity 6.3. Before that, I had Prism 5 and Unity 4. Now I’m running into problems with the Prism.Unity.UnityBootstrapper: it seems that the Container field is still a Microsoft.Practices.Unity.IUnityContainer instead of Unity.IUnityContainer. I...
14 Aug 2018 by Pete O'Hanlon
Have you checked to make sure your using statements are not still referencing Microsoft.Practices.Unity? The upgrade process doesn't rewrite code for you so you're going to have to replace those entries yourself. It could be just as simple as doing a global search and replace to replace...
7 Aug 2018 by Dirk Bahle
Your SchoolPrism .proj file looks strange because it contains an empty StartupObject tag: I cannot test this right now but you could either try to set: 1) App.xaml in the start-up project option or 2) Remove the...
25 Jul 2018 by Ian Bell, #2
Prism was designed for enterprise applications where it is not uncommon to have thousands of modules and even thousands of developers. Prisms features (e.g. assisting with with MVVM, GUI, navigation, communication between modules) are critical to large scale applications. As I mentioned, for...
25 Jul 2018 by nmeri17
Is there a default module loading mechanism in prism? What happens if I don't load my modules in code or by discovery? What I have tried: I can still call the module's methods like any other class (after referencing the library), so what's the catch?
24 Jul 2018 by Ian Bell, #2
If you are able to reference ALL libraries you need at build time then you do not have to use modules as defined in Prism. In this case (and if your requirements are simple) then using Prism modules can be overkill. Now, consider the situation where your application allows your users to...
15 Jul 2018 by nmeri17
Hello there. On click of a textblock, I want to lift its contents in my view model and if accurate, navigate to another page. Unfortunately for me, the click event never triggers its bound command. Below is my code What I have tried: In the xaml, I have this markup
15 Jul 2018 by George Swan
Try setting the DataContext like this
15 Jul 2018 by nmeri17
Using Solved it
29 Jun 2018 by nmeri17
In order to obtain the region manager at work in the shell from other modules, I took the RegionManager argument passed into Shell by Prism, and assigned it to a member field. public partial class Shell : Window { public IRegionManager x; public Shell(IRegionManager...
29 Jun 2018 by nmeri17
I'm trying to inject a view into my shell. The docs state Quote: The RegionManager class provides access to the Region objects within the application. but when I initialize the RegionManager class and attempt to call Regions["MAIN_REGION"] on this instance, it says no such region was found in...
29 Jun 2018 by Dirk Bahle
I do not work with regions myself but did you know that you can find a PRISM samples project at: GitHub - PrismLibrary/Prism-Samples-Wpf: Samples that demonstrate how to use various Prism features with WPF[^] This project contains at least 2 Region specific samples (see below) - does this help...
10 Jun 2018 by George Swan
My approach, for what it's worth, would be to do something like this. Using Prism.Events, declare an event. In the following example the event's payload is a bool but you can use any object. public class DatabaseServiceIsSavedEvent : PubSubEvent { } In the class that wishes...
10 Jun 2018 by Member 12658724
I have a View MyView and corresponding ViewModel MyViewModel. Above the MyView there is banner(user control). The banner is used by many views. Its function is to display notifications. There is a method inside the banner's code behind. Now I have a button command in the MyView. I want to press...
9 Jun 2018 by Gerry Schmitz
The "banner" is just another "view"; I see no issue slotting in with the "other views". It should have it's own "model" that responds to "incoming messages" posted from "other models" (or whatever). You do not appear to be treating it as a view but as a "user control" (?); and therefore your...
22 May 2018 by F-ES Sitecore
I googled "unit test mvc model validation" and this was the first result TDD for ASP.NET MVC Part 4: Unit Testing View Model Validation -- Visual Studio Magazine[^] If you google yourself you'll find others. In general though you should only unit test your own code, the model validation is...
22 May 2018 by Member 12658724
Please see the example. Say I have the data model as public class Model { [Required(ErrorMessage = "You must enter a username.")] [StringLength(10, MinimumLength = 4, ErrorMessage = "The username must be between 4 and 10 characters long")] [RegularExpression(@"^[a-zA-Z]+$",...
2 Apr 2018 by Member 12658724
I use another way. Bind IsExpanded and IsChecked. Similar the method at c# - StackPanel Collapsed and Visible on Button Click - Stack Overflow[^]
2 Apr 2018 by Member 12658724
In my view say I have a ListView. In each ListItem there is an expander. Outside the ListView there is a button, to click it will expand or collapse all expanders. Now I use Prism and MVVM in my WPF user control. What I did was in each expander I set a bool property which is binding with...
31 Mar 2018 by Clifford Nelson
I would create a behavior. The following is an example of a behavior: using System; using System.Collections.Generic; using System.Linq; using System.Windows; using System.Windows.Controls.Primitives; using System.Windows.Media; namespace Medtronic.NIM4.UI.Common.Converters { public class...
28 Mar 2018 by vinothezhilan m
Kindly check the github sample code which i created on this. you need to upgrade the NuGet package to use 7.0.0.444-ci (ModuelA has zero packages)
28 Mar 2018 by san2debug
I am trying a hello world program in Prism.WPF 7.0. I am trying to load a module from app.config file. Which is not working. I am using PrismApplicationsince isUnityBootstrapper Obsolete in Prism.WPF 7.0 My app.config as ...
12 Jan 2018 by Richard Deeming
If you want to disable the command when any one of a set of properties is empty, then just update the CanExecuteAction accordingly: CanExecuteAction = n => !string.IsNullOrEmpty(FirstProperty) && !string.IsNullOrEmpty(SecondProperty) && ...
12 Jan 2018 by Member 12658724
I was recently asked a question on how to disable a button when the View is loaded; and then enable it again when the end-user starts entering data in some textboxes. For e.g. in a WPF Search application, only if the end-user enters some text in the Search textbox, the Search button should...
12 Dec 2017 by Silky Kansal
There are 2 different views in which I handle the enable disable of different buttons one in the context menu but another in ribbon bar, Context menu, and ribbon bar is present n different 2 views. Enable disable of these buttons are based on the same operation which is defined in the view...
12 Dec 2017 by PureNsanity
Depending on how it's being used, you could declare the CompositeCommand as an exported class. Then each view model could import the CompositeCommand and register it's own command. [Export] public class SaveWidgetsCompositeCommand : CompositeCommand { } [Export] public class...
9 Dec 2017 by Kenneth Haugland
If you know what to search for it shouldn't be that difficult: DelegateCommand and CompositeCommand in Prism[^]
21 Oct 2017 by Luis Ormeno
Hi, You managed to solve the problem, I am in the same situation and I do not know how to solve it.
30 Jan 2017 by Brady Kelly
I have a Prism WPF app that uses services to read data from either a web API or directly, via EF. I want to register the services into the Unity container, and am thinking having them singletons is a pretty good idea. There should only ever be one thread using any one service, as it's a desktop...
30 Jan 2017 by F-ES Sitecore
As long as they don't store state in the class itself you should be ok, ie if methods only use variables local to the method.
28 Jan 2017 by Illya Reznykov
Screen saver application written in WPF with Prism pattern
4 Jan 2017 by Evosoul04
I ran into a problem with my GUI. My GUI has multiple parts in it. The first one is for an image (from 500x500 to 3000x3000 and it has to update up to 4 times each seconds) The second one is the main menu The third one has buttons with options regarding the image. I am not showing all of them at...
4 Jan 2017 by Pete O'Hanlon
There are many reasons your application could be running slowly. You really need to attach a performance profiler to investigate things properly. As we don't have access to any of your source code, there is no way that we are going to be able to definitively state what the performance issue...
22 Dec 2016 by rudrapmishra
No answer till today :(
15 Nov 2016 by J. Calhoun
I tried this without the caller name and actually passed the string and it worked for me, another work around if you do not want to use the code behind because I rarely like to do such things is to bind it to a command using the System.Windows.Interactivity class and implementing a Event...
15 Nov 2016 by Member 11949544
Hi guys,This is actually my first question here. I tend to find all the answers browsing the net, but haven't found the answer to that question yet...*I've created this code especially for the question, look below please!*I've been trying to figure out if there is any way to do...
14 Nov 2016 by FNU Amit Kumar
I am working on a Large wpf applications, We opted for Shared Resource Dictionary because ResourceDictionaries are always instantiated, everytime they are found in an XAML we might end up having one resource dictionary multiple times in memory. Get benifitted from this and cut down from 800mb...
3 Aug 2016 by Kenneth Haugland
Well, they do work as expected. If you write something in the SelectedTextBox and the text isn't updated, hitting Tab when you are completed, it does update the values in your collection. But for me it works as you want it to, without any changes to the code. If you do have problems you...
25 May 2016 by Kassim Shaikh
I am developing a WPF application with Prism framework. I have few modules which are interacting with each other through ViewModel or Event aggregator.I have this two module :1. Items Lists Module - which is getting real time status of the items from the server. I created a simple...
23 Mar 2016 by Rubén Hinojosa Chapel
Prototype for a plugin architecture based on the Prism Library and the Modern UI for WPF (MUI) toolkit
22 Mar 2016 by Chandrasekhar Telkapalli
Understanding the User Business Process,analysis on benefits of doing Automation and best approaches & practices in designing the solution
4 Feb 2016 by Yashashwi Srivastava
This article is a brief insight into building composite application using Prism, MVVM design pattern.
29 Nov 2015 by MatthewThomas
Adding design time support for regions in Prism 6
8 Nov 2015 by Member 11844200
Hi!I'm new in PRISM and WPF and sorry for my English too.My problem is the following:I have a datagrid, and when the user would like to delete rows, I notify him/her with a Confirmation Popup window (prism). If he/she accept, the selected rows will be deleted, but if he/she cancel the...
8 Nov 2015 by Suvendu Shekhar Giri
Setting focus on datagrid in the PreviewKeyDown-Event may help.Check the following code-private void YourDataGrid_PreviewKeyDown(object sender, KeyEventArgs e){ if (e.Key == Key.Delete) { var grid = (DataGrid)sender; ...
24 Oct 2015 by FurqanSafdar
This tip and trick describes a way to make MahApps.Metro Flyouts work with a modular application sample in Prism Library.
2 Oct 2015 by ChRi$m0rG@N
A tool for filtering and merging large text files.
19 Sep 2015 by dartfrog
I am developing wpf application using MVVM Prism. I got four views , MainWindow, ViewB, ViewC and ViewD and all are attached with their respective ViewModel. I initialized the backgroundworker at application start. see the following background worker class.public class BackGroundThread ...
18 Sep 2015 by Weeiyourda
Hi All Experts,I got some problem in showing download percentage in GridView of WCF.i used MVVM pattern. here is my background worker in application start. public partial class MainWindow : Window { public MainWindow() { Overall.EverythingOk =...
1 Sep 2015 by Erevis
I have Visual Studio 2015. I am trying to learn PRISM/UNITY/MEF. I have downloaded the Interactivity Quickstart solution. After resolving the reference issues, I now have this error showing up.The local property "Actions" can only be applied to types that are derived from...
7 Mar 2015 by Subramanyam Shankar
The link you provided didn't work.Hope this helpshttps://msdn.microsoft.com/en-us/library/ff921146.aspxhttps://msdn.microsoft.com/en-us/library/gg406140.aspxhttps://msdn.microsoft.com/en-us/library/ff921146(v=pandp.40).aspx
6 Mar 2015 by Subramanyam Shankar
If a resource is accessed by a process then it will have a lock.So no other process can access the resource in this case. So make sure when you access the file no other processes are accessing the file. There is no way to fix this issue. Either you have to kill the process which is using the...
12 Feb 2015 by Peter Leow
Refer:MEF vs. PRISM. What is the difference?[^]
12 Feb 2015 by Amal E S
What is the basic difference between Prism and MEF in MVVM (silverlight).
11 Feb 2015 by TheRealSteveJudge
MVVM is just an architectural pattern.PRISM is a framework which can help you to implement this pattern.For more information on how to implement MVVM using PRISM please have a look at:Understand MVVM Using PRISM by Hello World Silverlight Application[^]
11 Feb 2015 by Amal E S
What is the difference between mvvm and prism ? Can we develop an application using pure MVVM.
27 Jan 2015 by Member 8234507
HI I am new to wpf mvvm...issue is Does not allow mouse events when loader is running in wpf mvvm prism...(no actions in background)..Pls anyone help me..becasue of this i am wasteing 4 hours...pls help me...
8 Jan 2015 by User 271009
Microsoft patterns & practices Prism 4 library and guidance gives WPF and Silverlight developers a very solid foundation for creating business applications.
16 Dec 2014 by Maciej Los
Hmmm... i decided to post my comment as an answer ;)Start here: Developer's Guide to Microsoft Prism Library 5.0 for WPFBTW: i have no idea which is best (code first or database first), because i i think it's not comparable...
16 Dec 2014 by Robert Blot
Hello, I am trying to develop an app utilizing WPF, MVVM, Prism, EF, SQL Server, and possibly WCF to perform database operations. This is a project to learn how to implement Prism and is an app I am going to use to keep track of my movie collection. Which approach would be the better...
11 Dec 2014 by hari111r
Hi All,After every release I getting one of the below exception in few machine, after I un install the application and reinstall my this issue got resolved. Can anyone please help me to came out of it.Microsoft.Practices.Prism.Modularity.ModuleTypeLoadingException ...
4 Dec 2014 by Member 11143298
I did that made an executable project as startup project but yet it gives an activation exception. what should I do?
27 Nov 2014 by Member 8234507
HiI am getting this message when i am trying delete pdf file.An exception of type 'System.IO.IOException' occurred in mscorlib.dll but was not handled in user codeAdditional information: The process cannot access the file xxxx because it is being used by another...
26 Nov 2014 by Member 8234507
Hi I am showing the payslip using wpf mvvm.First time its showing payslip. i selected another payslip but wpfpdfviewer shows the previous payslip.The code ispublic PdfView(PdfViewModel viewModel){ InitializeComponent(); this.DataContext = viewModel; string...
17 Nov 2014 by Shweta Lodha
This tip will talk about how to handle events associated with UI controls in MVVM structure.
16 Nov 2014 by vinuvasahanponniah
xaml:xmlns="http://schem...
16 Nov 2014 by Member 8234507
Hi i am new to wpf mvvm prism. Here the items are static items(Not Resumed and Resumption and Cancellation). current item of combobox is coming from database(i.e one of the static items) The code is ActionItems = null; ...
4 Nov 2014 by Karthik Ravi
Hi,I am new to WPF can anyone give solution for my problem..In a shell.xamal file i have 2 region (TopRegion, MainRegion),in TopRegion i have only one combo box with 2 items, depending upon choosing the item in combo box user control will generated in MainRegion.In my another...
28 Oct 2014 by Sergey Alexandrovich Kryukov
It has nothing to do with your code. This is nothing but the matter of using Visual Studio. It's Solution Explorer has the context menu. You need to choose what to run. Select the application project node, not the library project. Activate the context menu. Either run selected application from...
28 Oct 2014 by Member 11143298
I have the scenario as there are four projects named as1) Freedom.Composite.Core2) Freedom.Composite.Styles(Catalogs,Commands,Converters,LoggerComponents,LoggersViewModelHelper)3) Freedom.Core.XmlSerializers(Different Styles of the UI)4) SyncDash(There are views into it.The ) When I...
21 Oct 2014 by Member 11143298
When i run my Project it opens a dialogue asking to locate the files named ServiceLocator.cs and ServiceLocatorImplBase.cs. Can anybody hepl me in knowing why is it used for and how to fix it.
20 Oct 2014 by Shmuel Zang
Try this MSDN topic: http://msdn.microsoft.com/en-us/library/gg405484(v=pandp.40).aspx.
20 Oct 2014 by Member 11143298
I am completely new to MVVM WPF using Prism Framework. Can anybody help me to understand as to how and what thing to be included in Model,View and ViewModel. Also how ViewModel are binded.
27 Aug 2014 by flou
Hi,I'm developing a big app since 2 years in WPF .NET 4 with MVVMLight framework, SOAP WebServices, ENtityFramework...My current task is to develop the same app in full-web. So after many searches, i finally decided to use Silverlight 5 and Prism to develop in parallel both app. My...
6 Aug 2014 by jacobjohn196
Professional, but paid;-)http://www.telerik.com/products/wpf/gauge.aspx[^]http://www.infragistics.com/products/wpf/radial-gauge[^]
5 Aug 2014 by Kinna-10626331
Hi , I have to design and implement a conning dashboard ( with gauges and level bars,etc..) in WPF.I have been looking for libraries like Insim , Dundas, MS Chart Controls and now I am a bit confused.All that I found looks a bit old and complex code.Is there any profesional and modern...
4 Aug 2014 by Richard MacCutchan
WPF could be a good choice, but a lot depends on what the application does under the covers. I would suggest taking a look at some of the WPF articles here on CodeProject[^] to see what can be done.
3 Aug 2014 by Kinna-10626331
I have to build an interface in C# for a conning display like this (Example) http://www.maritime-executive.com/media/transfer/img/OL_120224_conning.jpg[^]I want to build something modern and I have main doubts about if should I use a WF or a WPF.It going to be the interface of a local...
8 Jul 2014 by Gold$Coin
Hi all,Any one know an msdn link for pictorial representation of Mapping of composite application concepts Prism[^] with MVVM. as like the link i have provided please let me know.
29 Jun 2014 by Abhinav S
TryVirtual Paging with Silverlight/WCF Services[^]Introducing An MVVM-Friendly DomainDataSource: The DomainCollectionView[^]
29 Jun 2014 by somnath roy24
Hello friends,Can anyone please help me regarding how to receive the the 'page index' and 'page size' as parameter in 'View Model' on clicking 'data pager' page index? The project architecture is MVVM with Silverlight using Prism. The data grid is bound to a Observable collection. How to...
27 Jun 2014 by somnath roy24
hi friends,Can someone help to create a silverlight datagrid with datapager which will dynamically fecth data from stored procedure by sending the index and page size and fetch the exact number of data from database? I mean something that is on demand fetching of data? Thanking You...
11 Mar 2014 by Abhinav S
TryBinding to the selected items of a ListBox (or another items controls)[^]ListView MultiSelect, MVVM and RoutedCommands[^]MVVM Multiselect Listbox[^]
11 Mar 2014 by jthomas1234321
Add a second property to the viewmodel:public CartData SelectedCartDataand bind the Selected property of the listview in XAML making sure to set the Mode to TwoWay. This way the binding is pulling data from the cartData collection and pushing the selected value back into the...
11 Mar 2014 by hack.luminence
hello guys i was able to add items using this methodpublic ObservableCollection cartData { get { if (App.Current._cartData == null) { App.Current._cartData = new ObservableCollection(); ...
10 Mar 2014 by Arthanarieaswaran Shanmugaraj
It seems your View object is loading every time. Please load the view object at first time and store it into RegionManager. Then check if region manager has view, you can get View object from region manager. PRISM allows to get already available view from region manager.Artha