prism

Prism MVVM - Add child View to parent View without using Regions and Injection, just XAML

Hello, I'm fairly new to the Silverlight and the MVVM / Prism pattern so this may be a stupid question. I have a View which has custom controls within it. These custom controls are actually Views too and have ViewModels to drive them. Currently to add these 'child' Views to the View I'm using (see Fig.1) and then in the ViewModel I ha...

How to Reset Silverlight View in ViewModel Without Creating New Instance

In my application, I instantiate a new instance of my view in its associated viewmodel's constructor. I also have some events to subscribe to with an event aggregator. public class FooViewModel { private FooView TheView { get; set; } private IEventAggregator Aggregator { get; set; } public FooViewModel() { Aggre...

Prism for Silverlight : How to maintian views in specific order inside a region.

Hi I am creating sort of a "Navigation panel" (which is actually an ItemControl) for SL and using Regions to allow each module to add his link to the panel. Problem is that modules loading is inconsistent and thus order of links in the panel can change according to modules loading order. Restricting the modules order is out of the que...

Configurable grid layout with Silverlight 3 and Prism

I’m developing a composite Silverlight application using Prism. Part of the application is a highly configurable dashboard. A configuration file is downloaded by application through web service and the dashboard is constructed at runtime from the configuration file. Along with references to data sources and views (in terms of Prism), a c...

Problem with "{Binding RelativeSource={RelativeSource FindAncestor...

I'm working on a Prism Composite application where I load different views into a region. I need to make sure that the view I'm loading is resized to the same height as the region. Each view is a usercontrol that has a Grid as the outer element. I'm using the following code <Grid Height="{Binding RelativeSource={RelativeSource Find...

Attach Prism Command to Grid?

Is it possible to create a command behavior using Prism's CommandBehaviorBase class for Silverlight's grid? I know that it is only intended for actual controls, so I was wondering if anyone might know if a workaround. I would like to create an attachable mouse over behavior for a grid, that executes a specific command, and ideally woul...

Showing the Wait Cursor?

I want to show a wait cursor during a time-consuming process in a Prism app I am writing. I have wired it up using a WaitCursorRequestEvent<bool> composite event. 'True' means show the wait cursor, 'false' means go back to default. The Shell subscribes to the event and processes it using the following event handler: /// <summary> /// ...

Adobe AIR, Microsoft Silverlight, JavaFX and Mozilla Prism... What are your thoughts on this competition?

There are a lot of questions on S.O. about JavaFX vs. Silverlight vs. AIR, and now Prism is going to be released. These are four different technologies with a similar goal. I thought we could gather the main points -pros and cons- to consider one or the other in a community wiki question. Try to keep the flaming level at its lowest pos...

Read InitParams into Service with Prism

I am building a Silverlight application that takes a single InitParam that will be used throughout an application (at least in a number of services). We are looking at building the app using Prism and what I would like to know is - how do we instantiate a service that takes this parameter and makes it globally available? ...

how to get the region name?

using Silverlight & Prism. i create a new scoped region inside a TabControl like so: IRegionManager regionManager = tabControl.Add(viewRegions, UNIQUEID, true); then from the TabControl SelectionChanged event i want to get the name of that region. so i go: TabItem item = e.AddedItems[0] as TabItem; FrameworkElement view = item.Conten...

Design Patterns in PRISM

Hello guys, I'm in some sort of confusion: at one hand Microsoft architects and surrounding web community promote MVVM pattern for building WPF apps, but from the other hand in Prism patterns and practices they uses absolutely other design patterns - MVP, Presentation Model and Supervising Controller! And not a single example of use pure...

Extending modular approach of PRISM (CompositeWPF)

The native PRISM's modulariy mechanism support loading modules by path to assembly, containiтg this module. I want to have availability to store modules' views (XAML) in database in order end user could change and customize them. Database is chosen as it is simpler to store and retrieve information and requires no recompilation and makin...

Prism 2.1 Injecting Modules into ViewModel

Hi all, I've been trying to inject the modules from my ModuleCatalog into my Shell's ViewModel but I'm not having much luck... I'm creating the ModuleCatalog in my Bootstrapper and my module is getting onto the screen from its Initializer without problem. However, I'd love to be able to bind my list of modules to a container with a Da...

Silverlight MVVM Where to start

My company is making a big push to silverlight and I am getting everything laid out for this push. I am investigating Prism and MVVM in Silverlight. Is this the best way to go. Anyone know any good END to END Tutorials on MVVM in Silverlight. Thanks ...

How Can I Add Event Aggregation To An Existing Silverlight App?

I have an existing Silverlight application where Page.xaml has some buttons on it that load user controls into a TransitioningContentControl content host. Each of these user controls is bound to a viewmodel. Sometimes when changes are made to one user control, data in others would need to be updated. I have been looking at using the eve...

I need to run a function everytime a module is requested using Prism in C# .net

Hello I am using Prism in an application and I need a way to run call a function every time a module is requested. The thing is that this function will query the database for some items, and I need to do this every time the module is requested by pressing the module item buttom from a menu. I tried adding this to the constructor, but th...

Designing a simple Save Dialog in Prism

I am writing an application using Microsoft's Prism framework and I'm having trouble working out the best way to approach a simple 'Save File' style dialog box. NB: I can't use the standard dialog as I'm not saving files to the file system so need to write something similar from scratch. So here are the main controls I have for my dialo...

Cannot find Region in RegionManager (using PRISM)

I'm writing an application in Prism. I have a user control and contains two <ContentControl> controls. These both have Regions assigned to them. The usercontrol is being hosted in a Window that is being shown using ShowDialog(). I'm adding the one of my views to a region using view discovery and the other I want to inject the view into i...

How to get the popup to go full screen?

Hi, I am currently experimenting with the ChildWindowDialog and with prism I have created a controller class. I would like my popup to be displayed on all the screen (a bit like fullscreen mode). I have HtmlPage.Window.Eval() below but I am not sure if this is the correct thing to do. One of the reasons it feels wrong is I have no idea ...

WPF Prism - load view dynamically in pop up window

Hi there, We have multiple project solution based on MS Prism in WPF. For ease of understanding lets take we have project shell, and project usercontrol. The usercontrol project has numerous views for various functions. We have a pop up window in shell project which is called from main shell window, what i want is to load different view...