compositewpf

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. ...

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 ...

Composite WPF: Showing/Hiding Views?

I am getting up to speed on Composite WPF, building a small demo app to work through the issues. My app has one region, and two modules, Module A and Module B. Each module contains a simple "Hello World" text block. Both modules are set up as load-on-demand, as per this MSDN How-To. The shell has two buttons, "Load Module A" and "Load M...

Composite WPF: Global variables?

In a Composite WPF application, what is the best way to store global variables needed by several modules? For example, I am working on an application in which several modules need to get a file name, so they can fetch the data they need from the file. Is there a best practice for storing information like this in a Composite WPF app? How...

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...

One resource dictionary for all projects in a solution?

I am working on a WPF solution that has several WPF projects--en EXE and several user control DLLs. I'm building a Composite WPF app, and each of the DLLs are modules. I have created a resource dictionary to provide common styling for all WPF visual components, which I have added to each project in the solution. It works, but it's a rea...

How to change a WPF control's visibility from ViewModel

I've an WPF application where tried to implement MVVM pattern and Prism 2. I have a Usercontrol which has subscribed to an event fired from another Usercontrol. I would like to toggle visibility of few child elements in the subscribing control. Events are fired properly, even I am successfully able to bind data to some elements. How do I...

Prism2/MVVM Close View from ViewModel

How do I close a View from its ViewModel? I've a WPF window which has defined multiple Regions and being used as a Shell to host views for my application. I would like to have a View able to remove itself from the Region, or close it from a tabbed container. How can I accomplish this behavior from ViewModel. ...

In Composite WPF (Prism), what is the difference between IRegion.Add and IRegionManager.RegisterViewWithRegion?

In Composite WPF (Prism), when adding modules to the IRegionManger collection, what is the difference between using IRegion.Add and IRegionManager.RegisterViewWithRegion? IRegion.Add public void Initialize() { _regionManager.Regions["MainRegion"].Add( new ModuleAView() ); } IRegionManager.RegisterViewWithRegion public void Initi...

Add Composite WPF Region at runtime

Ok, here's my simple scenario. I've got collection of strings that I'm binding to a TabControl as a proof of concept. As I add strings I want a new tab with the region name as the header and a ItemsControl in the Tab container. That ItemsControl should define a new region. <TabControl x:Name="tabDemo" ItemsSource="{Binding D...

Where to put Commands when injecting buttons into a ToolBar?

In my composite WPF application I am injecting some buttons into the shell's toolbar from a module. These buttons are injected using the region manager in the module's IModule Initialize function. Since I'm using MVVM and Commands, where would an appropriate place be to put the Command handlers (Execute and CanExecute) for the injected ...

Enable Button and DelegateCommand

How can I disable a button until required data is entered in a TextBox? I'm binding an Button to ICommand public ICommand LoginCommand { get { if (_loginCommand == null) { _loginCommand = new DelegateCommand<string>(this.Login, this.IsValid); } ...

WPF Binding - There must be a better way than how I'm doing it!

Overview I am using CompositeWPF to create an app using C#. This really should make a difference to the answer as my problem would exist outside of Prism. I have an ItemsControl which is bound to an ObservableCollection containing my ViewModels. This is working fine. In my DataTemplate I have my required controls bound in XAML. One...

How to resolve types registered in other Modules in Prism?

I'm registering few modules in my Prism application using UnityBootstrapper protected override IModuleCatalog GetModuleCatalog() { var catalog = new ModuleCatalog(); catalog .AddModule(typeof(LoginModule)) .AddModule(typeof(AppModule)) .AddModule(typeof(DataTransformationModule), InitializationMode.OnDemand)...

Integrating Modules with Application in Prism aka CompositeWpf

From MSDN: It is likely that most of the views in your modules will not have to be displayed directly, but only after some action by the user. Depending on the style of application, you may want to use menus, toolbars, or other navigation strategies for your users to access views. In the initialization method of the module, you can a...

Composite Application Framework Equivalent in Java

Just wondering what the opposing framework in Java would be for creating modular GUI applications, with things like event aggregation, etc. I know for Java there isn't a single definitive GUI framework, and so far I've seen the Eclipse RCP and Netbeans Platform, however these don't seem to do these kind of things. I'm a .Net developer ...

What is the best method to load Views dynamically from a Navigation control in Prism

I've implemented navigation through my application using a Menu control which publish an event using EventAggregator on click of menu item. Something like as shown below, this.eventAggregator.GetEvent<ViewRequestedEvent>() .Publish(new BusinessObject.Model.MenuModel { Modu...

Why a View is loading very slow for the first time in a Prism composite wpf application

Displaying a View inside a Region is about 5-10 seconds slow for the first time, and UI freezes for that period in my Prism Composite WPF application. In subsequent times View is loaded relatively faster without any UI freezing. View is composed of a Devexpress WPF Grid control and data is fetched from a SQL database. I don't think its a...

How to design prism EventAggregator?

Pattern of pub-sub events is that the publisher should not know or care if there are any subscribers out there, nor should it care what the subscribers do if they are there (from Brian Noyes' blog) What are the best practices to using EventAggregator in Prism? Currently I have few modules which are loosely coupled and wo...

Best logging approach for composite app?

I am creating a Composite WPF (Prism) app with several different projects (Shell, modules, and so on). I am getting ready to implement logging, using Log4Net. It seems there are two ways to set up the logging: Let the Shell project do all of the actual logging. It gets the reference to Log4Net, and other projects fire composite events ...