prism

Point of Sale Application Architecture

Hi Guys, I have been asked to build a POS Application for a Restaurant. I have experience creating POS application in VB6.0 and have always wanted to create one with UX. I am looking to create one with WPF as front end. I pretty much have the process picture in mind and also screens. Said so much, I am not sure how to Architecture one....

PRISM RegionManager - Non-XAML creation of ItemsControl RegionManager

Hello, I have a small problem with Regions in PRISM. All basics tests work fine, but now I want to replace the following XAML with pure C#: <UserControl x:Class="CAL.Modules.Simple.Region_Testing.RegionManagerTypes.XAML.ItemsControlRegionAdapterTest" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http...

Why would adding an **appSettings** section to App.config cause an error in WPF application?

In my WPF application (Composite Application) I want to store a variable in the App.config file, but as soon as I add an appSettings section in App.config, it gives me this error: The type initializer for System.Windows.Application threw an exception. App.Config: <?xml version="1.0" encoding="utf-8" ?> <configuration> ...

Share context data with all children of a control

I need all children of a view to know a piece of contextual information (the person they need to show). I also need the approach to be compatible with MVVM. I tried to do this with RegionContext in my Prism application. Here's my approach and problems: I have a TabControl that I use View Injection to populate with views so that I can...

WCF PerCall instance server and Dependency Injection using Prism?

If I have a client/server type of application built using both Prism and WCF, and I would like on the serverside to have the wcf service to be instatiated per call BUT I would like to use dependency injection (using the UnityContainer in Prism). How could I possibly do this? Should I have a single instance service it would be no problem,...

MVVM & WCF - View Model and Model Relationship

I am not understanding how my model can be a WCF service. It makes sense when its an Astoria partial class residing on the client that allows remote calls to do persistence calls, but a WCF service doesn't have properties for model fields that can be used to update a data store. Even if I could factor out an interface for a model/dom...

How to send a parameter to an object's constructor with Unity's Resolve<>() method?

Using Unity in Prism, I would like to send a parameter to the object's constructor like this: PSEUDO-CODE: SmartFormPresenter smartFormPresenter1 = this.container.Resolve<SmartFormPresenter(customer)>(); But instead I have to instatiate it and then assign a property: SmartFormPresenter smartFormPresenter1 = this.container.Re...

Unit testing functions relying on MouseEventArgs?

I am currently working on a project of mine which is a MSPaint-like WPF application. However I don't paint with pencil tools or something similar but with objects (Rectangle, Circle, Triangle etc.). I use Prism and the MVVM model to achieve testability and maintainability. I've now run into a problem. I have a CanvasView.xaml that's (as...

Bubbling RoutedEvent or RoutedCommand to a ViewModel

I've got a collection of ViewModels that are rendered as tabs using a style to pull out the relevant content to display on the tab: public class TabViewModel : DependencyObject { public object Content { get { return (object)GetValue(ContentProperty); } set { SetValue(ContentPropert...

Complex View in WPF

Hello Guys, I am working on a personal project. I started with a previous post (http://stackoverflow.com/questions/1215650/point-of-sale-application-architecture). Trying to Use- repository - service and View Modal - View approach Please see the attached image file. Most of my windows will have multiple views. My Questions are...

Unit testing functions that only change private member variables?

I am currently writing unit tests for a ViewModel in my project that uses Prism and the MVVM pattern. My view mainly consists of an ItemsControl that reacts to different mouse events (LeftMouseButtonDown, LeftMouseButtonUp etc.). When such a mouse event happens the EventArgs and some other glue info is handed to the ViewModel and an app...

Unity in Prism using WPF

In Prism can we have another instance of unity at module level to register the classes in a particular module.so that i will not load the application level unity with so many classes in different modules. ...

How to control the order of module initialization in Prism

I'm using Prism V2 with a DirectoryModuleCatalog and I need the modules to be initialized in a certain order. The desired order is specified with an attribute on each IModule implementation. This is so that as each module is initialized, they add their View into a TabControl region and the order of the tabs needs to be deterministic and...

Sync SelectedItems in a muliselect listbox with a collection in ViewModel

I have a multi-select listbox in a SL3 app using prism and I need a collection in my viewmodel that contains the currently selected items in the listbox. The viewmodel doesn't know anything about the view so it does not have access to the listbox control. Also I need to be able to clear the selected items in the listbox from the viewmod...

Windsor with composite WPF February release (Prism 2)

Has anyone managed to create a windsor bootstrapper for prism2? Prism 2 seems to rely on Unity's behaviour of injecting types that haven't yet been registered. Thanks. ...

MEF: a replacement for PRISM?

To what extent, if any, is MEF a replacement for PRISM? ...

Prism and Using Unity IoC in Prism

I am a total newbie on Prism. I have been getting to understand a lot from questions on SO and from various Blogs. I am using latest build – V2 I want some explanations on things that may be pretty easy things for you guys but it’s just not getting into my brains (small one for that). Instead of doing it all right the first time , for ...

How to get the Control for a Region in Prism

Hi, Does anyone know how to get the control associated with a region in Prism. For example, if I have the following code to register a region RegionManager.SetRegionName(Outlook.navigationContainer, "navigationContainer"); How can I get the control Outlook.navigationContainer via the name "navigationContainer"? Thanks heaps. ...

How to use Prisim within an ElementHost

I'm new to Prism and I am attempting to host a Prisim control within an ElementHost. I seem to be missing something very basic. I have a single WinForm that contains an ElementHost. The following code is in the form: public partial class Form1 : Form { public Form1() { InitializeComponent(); Bootstrapper boots...

Prism: Commanding Delegate<T>

I have a View with ViewModel as datacontext ( set in code) . In my view I have a list <UserControl x:Class="ZPOS.Modules.Menu.Views.DepartmentView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:prism="clr-namespace:Microsoft.Practices.Compo...