prism-4

Activating views in regions in Prism

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 01:08:21
问题 I have problem that I don't seem to be able to solve. I have a created a test project, using MEF and Prism4. I've created a test project where I have 2 views and each of them register themselves inside a region, and also a button in another region. When the button is clicked, I want the view of change to the correct view. The code I think is wrong is below, anyone have any ideas what I am doing wrong here ? public void Initialize() { regionManager.RegisterViewWithRegion(RegionNames.MainRegion

Whats the status of Prism integration in Autofac?

北战南征 提交于 2019-12-10 18:47:22
问题 Integration into Prism was talked about in the 2.1.x time frame, we are @ 2.4.x, Prism 4 is out now and the RIStockTrader Example in /contrib is just a default XAML project. Should it work? If so, anyone have a simple example of a Silverlight Shell + Bootstrapper + 1 Module they could point me to? 回答1: An updated Prism integration is currently in progress. I'm not sure what the status is exactly, but you can get the code and potentially contact the author here. You can also pass on feedback

Is it possible to write Prism apps such that they can be tested without the UI?

自闭症网瘾萝莉.ら 提交于 2019-12-10 03:54:36
问题 Disclaimer: Prism Novice. I'm reading up furiously to make up for lost time though :) Context: I need to write automated acceptance tests for a WPF application built using Prism. Issues: I find that it is convoluted trying to compose the backing ViewModels and everything that they need without the UI. I may be wrong here... Prism allows you to mark up the shell with named placeholders (regions). Different modules (isolated units) register their Views with the corresponding RegionNames. The

Prism / MEF: How to RegisterViewWithRegion Without Hard-Coding the Region Name

对着背影说爱祢 提交于 2019-12-09 12:17:29
问题 We are building a WPF Prism application. We have different developers working on different module projects, and multiple modules are injected into the main Application Shell. The main application is also a separate project. We also want to be able to use the modules in different applications. We do not want to have to name the Regions with the same names in every application. For instance, say we have a module to be used in two different applications. In one application, its developer may

Strange exception in Prism application

孤人 提交于 2019-12-07 10:01:31
问题 I am trying to get a Prism application to start up, and am getting a very strange error: InvalidOperationException: ServiceLocationProvider must be set. I am using MainWindow in the main (module host) application as the region for a single main shell, that has it's own regions. That way I can swap out main window layouts if needed. I get the error on the InitializeComponent(); call, the only line of code in the constructor of MainWindow . Google and Bing both return zero results for that

getting error 'Microsoft.Practices.ServiceLocation.ActivationException' occurred in Microsoft.Practices.ServiceLocation.dll

我的未来我决定 提交于 2019-12-06 15:04:30
问题 I am Unit Testing MVVM based application that uses prism and using mocking to test view model . I am able to call the constructor of my viewmodel class by passing mock objects of region manager and resource manager but when control goes inside constructor it fails at the following statement : private EventAggregator() { this.eventAggregatorInstance = ServiceLocator.Current.GetInstance<IEventAggregator>(); } It gives error : An unhandled exception of type 'Microsoft.Practices.ServiceLocation

Displaying modal dialogs using PRISM 4

a 夏天 提交于 2019-12-06 13:29:21
问题 I'm developing a .NET 4.0 application using PRISM and MVVM, as well as WPF. I currently have a shell subdivided in regions, with views inserted in them. When the user clicks on a button in one of the views, I would like a custom-made modal dialog to be displayed on top of all the views, but still within the same shell. I looked at the StockTrader RI example and their implementation of the RegionPopupBehavior. Basically, they created a dependency property which allows them to define regions

ASP.net like form based authentication in WPF MVVM prism [closed]

空扰寡人 提交于 2019-12-06 04:48:30
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . Having working on WPF MVVM (prism) application, I would like to implement authentication as it is for ASP.NET form based authentication. I would like to restrict users going to screens where authorization is required. how can this be implemented in WPF application, as I am using PRISM. 回答1: Assuming you are

How to create a new view every time navigation occurs in PRISM?

我的未来我决定 提交于 2019-12-06 03:03:55
问题 I'm using WPF4 and PRISM4 for my new project. There is a single module with several views in it. The DI is done with unity. When I navigate from ViewA to ViewB for the first time, the ViewB is created and its constructor is called. But when I try to navigate to ViewB for the second, third time, the ViewB is not created, but existing instance is reused. I'm using IRegionManager.RequestNavigate for my navigation purposes. I've tried to pass TransientLifeTimeManager to RegisterType Unity methods

Strange exception in Prism application

吃可爱长大的小学妹 提交于 2019-12-05 16:11:46
I am trying to get a Prism application to start up, and am getting a very strange error: InvalidOperationException: ServiceLocationProvider must be set. I am using MainWindow in the main (module host) application as the region for a single main shell, that has it's own regions. That way I can swap out main window layouts if needed. I get the error on the InitializeComponent(); call, the only line of code in the constructor of MainWindow . Google and Bing both return zero results for that exact phrase. The XAML element in MainWindow is: <ContentControl regions:RegionManager.RegionName=