prism

Silverlight prism region events

In silverlight prism application I have a region (ContentControl) and would like to remove currently active view before adding another view. I tried to use region.PropertyChanged event but it doesn't fire. I can do it in the code where I add new view, but that will scatter my code. How to achieve this? Thanks for reply. ...

Silverlight 4: Prism still usable?

Would you still use Prism with SL4, even when Silverlight 4 already supports commanding, e.g. MVVM concept? Are there features in Prism which can be used and improve design of Silverlight 4 application? ...

WPF Prism Key Event problem

Hi, Im having trouble trying to solve the following problem. i have 2 modules w/views (A & B). on module A i have a listbox with items 1-4. i have a key up event that fires everytime i press the 'Enter' key to open module B, this event is on the grid which contains the listbox. on module B i have a button that closes module B and open...

MEF and Prism integration

Hi all , I need your advice deciding on a new project architecture I'm going to implement. Can I use MEF and Prism side by side? Is it too complex to accomplish this? Can make the same stuff Prism does with MEF? Right now, two features Prism gives, but are not in MEF are Regions and the Event Aggregator. Can I do everything else wi...

WindowsFormsHost and DependencyProperty

I've got a Windows Forms control that I'm attempting to wrap as a WPF control using the WindowsFormsHost class; I would like to bind the legacy control to a view-model. Specifically, the control exposes a grid property, GridVisible, that I would like to bind a view-model to. I'm using a private, static backing field and a static, read-on...

silverlight adding single prism command delegate to a list of items in xaml

I'm building a menu using Prism (using a trtelerik tree view with hierarchy data templates but hopefully the details don't matter) and I'm trying to set up a Click.Command on each menu items bindings that will all call the same delegate command which is defined in the view model. The menu is built up out of items which I don't really wan...

Styles Don't Update

I am trying to use theming within my application, but I am having a problem with my styling not being applied correctly. I run the following lines of code: App.Current.Resources.MergedDictionaries.Clear(); ResourceDictionary rd = new ResourceDictionary(); rd.Source = new Uri( "/Style2.xaml...

How to use parameterized region in Prism?

My shell has toolbar, navigation and main regions. While some menu item (foo) in toolbar selected, the navigation should be reloaded with parameter foo; and the main region should be reset with the parameter. How to do it? ...

Utilizing Frames/Pages and Composite Application Guidance (Prism) in Silverlight Solution

Is there any way to use pages/frames in a Silverlight Composite Application? I have previously created a Silverlight Application that utilizes System.Windows.Controls.Navigation.Frame and System.Windows.Controls.Pages. Here is the key piece of code: <navigation:Frame x:Name="FrameMain" Source="/Pages/StartPage.xaml"/> I am trying to ...

Searching for a WindowManager in PRISM / CAL / WPF

Hello, as the title already claims, I am searching for a WindowManager in PRISM. I know the RegionManager, and I found a LayoutManager which looks like a very promising project. Already tried it, and liked it. Now I added a post in the forum on the bottom of the page, basically I need something similar only for windows (not only layout...

Issues with dynamically loading modules in code with Silverlight/Prism

In my Bootstrapper.cs in GetModuleCatalog, I need to specify the Module types using the typeof(ModuleType). In the example below I'm trying to load the Contact module on demand, but in order to get it into my module catalog, I need to have a reference to it in the project that holds my Bootstrapper. When I add a reference to Contact, the...

Using ASP.NET session state with Silverlight (PRISM)

Hi, The scenario: I have a PRISM application developed in Silverlight (4), and I'm using a ASP.NET server side application to host several web-services (which, in turn, accesses WCF-services, but that's not really important here). The Silverlight application must be able to call the web services cross-domain (meaning that the web servic...

WPF + MvvM + Prism

Hi all, I am new in the Wpf & Mvvm world , but I have found a couple of examples and just found that there is some different way to instantiate the model. I would like to know the best/correct way to do it. both ways are using Unity What I've foud: var navigatorView = new MainView(); navigatorView.DataContext = m_Container.Resolve<INav...

MVVM pattern and nested view models - communication and lookup lists

I am using Prism for a new application that I am creating. There are several lookup lists that will be used in several places in the application. Therefore it makes sense to define it once and use that everywhere I need that functionality. My current solution is to use typed data templates to render the controls inside a content control....

Prism : Add a window in a region

Hi, I'm new working with Prism with WPF, and I have a question which I can't find answer. Why it is impossible to add a window in a Region ? I can understand there's a good reason, so I will need another solution to my problem. It is quite simple, I got a LoginView (Window) which I want to appear first. For the previous reason, in my ...

PRISM - Creating mouseoverbehavior causes a Silverlight library to not be visible in main Silverlight app to be able to create namespace ref in xaml.

Created a simple Silverlight 4 application (SimpleApp) then added a Silverlight 4 library (LibraryA). Added code to the library (LibraryA) to implement MouseOverBehavior by inheriting from CommandBaseBehavior along with the appropriate attached property class/methods. Added reference in SimpleApp to LibraryA and went to MainPage.xaml to ...

Add PRISM Region Manager In Existing Navigation Window

We have a "legacy" WPF applicaton that is based on a NavigationWindow. The NavigationWindow has a fairly large ControlTemplate that houses a ContentPresenter as so: <ControlTemplate> ....snip... <ContentPresenter x:Name="PART_NavWinCP" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/> .....snip.... </ControlTempla...

MVVM Binding Orthogonal Aspects in Views e.g. Application Settings

I have an application which I am developing using WPF\Prism\MVVM. All is going well and I have some pleasing MVVM implementations. However, in some of my views I would like to be able to bind application settings e.g. when a user reloads an application, the checkbox for auto-scrolling a grid should be checked in the state it was last tim...

Proper implementation of NLog and Prism

What would be the best way to implement NLog in my Prism / CAL WPF application. This might be an amateur question, I am a bit new to the whole Prism framework :) I thought about putting the reference to the NLog dll in the Infrastructure module and make a wrapper singleton class e.g. MyLogger. My thinking was to be able to have the refe...

EventAggregator, is it thread-safe?

Is this thread-safe? The EventAggregator in Prism is a very simple class with only one method. I was surprised when I noticed that there was no lock around the null check and creation of a new type to add to the private _events collection. If two threads called GetEvent simultaneously for the same type (before it exists in _events) it l...