Linked Questions

122 votes
3 answers
55k views

Can someone give me a quick summary of what a ViewModelLocator is, how it works, and what the pros/cons are for using it compared to DataTemplates? I have tried finding info on Google but there seems ...
Rachel's user avatar
  • 133k
21 votes
6 answers
24k views

I’m quite familiar with ASP.NET Core and the support for dependency injection out of the box. Controllers can require dependencies by adding a parameter in their constructor. How can dependencies be ...
user842818's user avatar
5 votes
1 answer
4k views

I'm using C# 6.0, WPF 4.5.2 and the PRISM-architecture 6.2.x (Unity). And I'm using a class derived from Canvas. So, there is a class MyCanvas, which is used in a UserControl (XAML) in the way of: &...
Elex's user avatar
  • 77
1 vote
2 answers
2k views

I know this might be a "style of coding" question but at this point I'm really confused. Currently I'm trying to follow the MVVM pattern (ViewModel, Repository, Controller etc.) But who should ...
Th1sD0t's user avatar
  • 1,129
7 votes
1 answer
2k views

I have a class that handles the Localization of my application. My goal is that the class is usable in the entire application so I made it static. This allows me to call the code below anywhere in my ...
Krowi's user avatar
  • 1,635
2 votes
1 answer
4k views

My application is going on a break mode after hitting a user button that loads the app setup. I have registered the component in the bootstrapper class. How can I register the constructor of the ...
jmutali's user avatar
  • 33
4 votes
2 answers
3k views

I have an application that opens a view that allows you to search for data. However, in order to to search, the user has to select what category he wants to search under. Currently, I'm trying to ...
James Parsons's user avatar
1 vote
1 answer
4k views

I am building a WPF Application, which has a single Window, a tabbed interface with multiple view models (2 view models, the first tab is ViewModel1 and the rest will always be ViewModel2) these are ...
user13499502's user avatar
2 votes
1 answer
2k views

My goal is simply this: I want the already existent instance of class "MainWindowVM" (implementing IMainWindowVM) to be injected into class "StaticTestsResultsViewModel". I do not(!) want a new ...
steady_progress's user avatar
1 vote
1 answer
2k views

I am learning Prism. Few hours already I am facing a problem, when subscribing to the event, the subscription method is not called. I am using Prism and Autofac. In the simplified example below, in ...
bakunet's user avatar
  • 197
1 vote
2 answers
910 views

My ViewModel: public class MainViewModel : INotifyPropertyChanged { private User selectedUser; private IUserRepository _userRepository; public List<User> Users { get;...
Santa Claus's user avatar
0 votes
1 answer
666 views

In my solution I am using Autofac, and Prism as well. Below is a simplified project that explains what happens. I am registering my views, view models and EventAggregator in Autofac's container class ...
bakunet's user avatar
  • 197
0 votes
1 answer
488 views

I'm using MVVM pattern, developing my WPF application. I also use Entity Framework as ORM. Here're my models (EF): public class User : BaseEntity { public string Name { get; set; } public ...
klutch1991's user avatar
0 votes
1 answer
577 views

When using LightInject, how can you use access the Container instance in contexts other than initial registration/bootstrapping? I followed LightInject's getting started guide and google around, but ...
daniloquio's user avatar
  • 3,923
1 vote
1 answer
258 views

I'm trying to apply DI to my WPF application (with MVVM). I would like to adhere to an onion architecture, and as such, my model has an IRepository interface which is injected via an IoC container ...
rory.ap's user avatar
  • 35.7k

15 30 50 per page