prism

Can Prism EventAggregator be used for threading needs?

Hi, I was looking at Prism EventAggregator and its' great. I part i was most concerned was its capability to marshal thread correctly to UI thread. I was wondering if i can use this capability to provide module developers a class which could be used to create threads in a similar way as BackgroundWorker. Interface of class can be some...

Does the application_startup() get called for each silverlight application?

I am using the templates for prism by David Hill and each application module contains a App.xaml file. I was sure that each module as it was loaded would create the App object (startup object in properties) and then call the application_startup() event. However, this does not seem to be happening? Is this correct behaviour? If so, how w...

Changing Region Views in Silverlight using Prism

Hi All, I have been learning Prism and Silverlight and am now trying to create a simple application but have run into a snag... What I have is a Shell with 2 ContentControls, "MenuRegion" and "ContentRegion". The way I want it to work is that a user will click on an item in the "MenuRegion" and then the approriate view will be displa...

How to use DataTemplates in Prism

I have been using Prism for a while now and enjoy how much easier it is to decouple my modules. This works especially great for views and view models since you can inject the view models via interfaces and the views via the region manager. Unfortunately this only works when my views are full blown user controls unless I'm missing somet...

wpf prism composite command

I have a composite WPF application. I am planning to implement tool bar functionality . There are few toolbar items ( basically print,save , hide , expand , undo) which will be common to all views in the main region. For this i have created default toolbar module which will add these items ( print,save , hide , expand , undo) to the to...

How to implement CRUD Master Details on the same screen under MVVM

I have a MVVM (Prism) application that I need to implement a master details screen wheer the master is a listview and the details is displayed next to it. Read-only seems easy enough (haven't done it yet but I've got my head around WPF binding) but edit/add confuses me. How to I make it so the master is not updated until the details is...

What do you do about ModelView files growing massive in a MVVM application?

I am writing a MVVM application and one of the screens is quite significant in size. The screen maintains and object that has multiple lists of other objects that also get editied within the context of the transaction. I've broken the views up into multiple user controls. The model is broken up into the different class types. The proble...

Exception: "The assembly used when compiling might be different than that used when loading and the type is missing."

I am building a Prism app with several modules, one of which (MyModule) contains a user control (MyUserControl) that I created. MyUserControl tests fine, but when I add it to MyModule and run the app, I get this exception: "Cannot find type 'MyUserControl'. The assembly used when compiling might be different than that used when loading ...

Prism: Looking for ideas of how to design apps that don't necessarily comply to a standard region layout

I have an app that has several modules that have completely different functionality and I'm trying to figure out the best way to implement this using prism. To try and better explain, I'll try to use Northwind as an example. I have 3 modules, orders, customers & employees. The customer module will allow you to do anything pertaining t...

DelegateCommand vs RoutedCommand and gestures - WPF

Hi, is there anyway for DelegateCommand's to support gestures when building a composite WPF app? I'm trying to create a command used by a MenuItem and also a Button, which can be accessed through a keyboard shortcut, but which sits inside a class in a separate assembly. I can use a RoutedCommand, but I want to minimise any code-behind....

WPF unity Activation error occured while trying to get instance of type

I am getting the following error when trying to Initialise the Module using Unity and Prism. The DLL is found by return new DirectoryModuleCatalog() { ModulePath = @".\Modules" }; The dll is found and the Name is Found #region Constructors public AdminModule( IUnityContainer container, IScreenFactoryRegistry...

Prism: Exception handling?

I'm getting an odd result in a Composite Event handler in a Prism app I am writing. I created the event handler and put in an exception statement to verify that the handler is being called: public void OnDateSelected(DateTime selectedDate) { // Temporary code throw new ApplicationException("Not implemented yet."); } I run the ...

Load Module Default Views In Region to Create Menu

I am builng an M-V-VM application with Dynamic Loading of modules at runtime. Each of these Modules has a default view which individulally they show on the selected region when I go _regionManager.Regions["BottomMenuRegion"].Add( Container.Resolve<AdminModuleView>(), "AdminView", true); However, When the Next Module loads it ove...

Why can't I bind my Silverlight Button Click to a Prism DelegateCommand

I have a simple test app in Silverlight 3 and Prism where I'm just trying to bind a button Click to a simple command I have created on a view model. This is a test app just to get commanding working. When I run it I get a binding error telling me that the view cannot find the command: System.Windows.Data Error: BindingExpression path er...

Using PRISM, how do I display the view from another module, and access its properties to update its state?

I have two modules, one is a Header module, one is a Items module. I have a HeaderDetails view, which contains a region which is called 'ItemsSummaryRegion'. This region is registered to populate the region with the view ItemListView from the Items module. regionManager.RegisterViewWithRegion("ItemsSummaryRegion", typeof(IItemListView)...

StockTrader RI > Controllers, Presenters, WTF?

I am currently learning how to make advanced usage of WPF via the Prism (Composite WPF) project. I watch many videos and examples and the demo application StockTraderRI makes me ask this question: What is the exact role of each of the following part? SomethingService: Ok, this is something to manage data SomethingView: Ok, this is ...

Detecting application exiting and how to stop when changes are not saved

Using the Composite Application Guidance tools from Microsoft, It seems as if there is no mechanism to allow you to query your modules ViewModels and ask if any of them have unsaved data. This is a problem because, and I'm guilty of this as well, you cannot stop the application from terminating when there is unsaved data... I had thoug...

How do I test Prism event aggregator subscriptions, on the UIThread?

I have a class, that subscribes to an event via PRISMs event aggregator. As it is somewhat hard to mock the event aggregator as noted here, I just instantiate a real one and pass it to the system under test. In my test I then publish the event via that aggregator and then check how my system under test reacts to it. Since the event wil...

Prism with multiple Modules and Modules depends on

Hi I'm in a scenario where I'm thinking about to have several modules, and let modules depends on other modules. say that we are building a business system while one part is invoicing and we have customers in different branches. So one industry may want to use some tools and create the invoice in their way, and another industry may wan...

What is the best way to handle navigation with PRISM?

Using Prism - what is the best way to handle navigation in a WPF application? And how do you apply this? Are there any best practices? In my application I'm currently using Event Aggregation. Any menu item or other item that should result in navigation in the program will publish an event, and the module responsible for opening the vie...