Questions tagged [mvvm-light]

The MVVM Light Toolkit is a set of components helping people to get started with the Model - View - ViewModel pattern in Silverlight, WPF, Xamarin, .NET Core and Windows Phone. It is a light and pragmatic framework that contains only the essential components needed.

The MVVM Light Toolkit is a set of components helping people to get started with the Model - View - ViewModel pattern in Silverlight, WPF, Xamarin, .NET Core and Windows Phone. It is a light and pragmatic framework that contains only the essential components needed.

The main purpose of the toolkit is to accelerate the creation and development of MVVM applications in WPF, Xamarin, .NET Core, Silverlight and Windows Phone.

Like other MVVM implementations, the toolkit helps users to separate the View from the Model which creates applications that are cleaner and easier to maintain and to extend. It also creates testable applications and allows to have a much thinner user interface layer (which is more difficult to test automatically).

More information about the MVVM Light Toolkit can be found on http://www.galasoft.ch/mvvm .

Currently there are versions for .Net 4.5, 4 & 3.5 and a portable version as well.

2856 questions
10
votes
1 answer

Silverlight Constructor Injection into View Model + Design Mode

Im trying to get to grips with writing testable ViewModels in Silverlight 4. Im currently using MVVM light. Im using AutoFac and the IoCContainer is doing its job fine. However to inject into the constructor of ViewModels, which are bound to Views…
Jammin
  • 3,050
  • 2
  • 23
  • 34
10
votes
5 answers

ListView SelectedItems binding: why the list is always null

I'm developing a UWP App, with Mvvm Light and Behaviours SDK. I defined a multi selectable ListView:
Francesco Bonizzi
  • 5,142
  • 6
  • 49
  • 88
10
votes
2 answers

How to use MVVM-Light with tokens?

I see in the MVVM-Light package that I can send messages with tokens- what I need to do is send an object, with a message attached to that object- like Add, Edit, Delete whatever. What is the best way to send and to recieve this message? I think…
Nicros
  • 5,031
  • 12
  • 57
  • 101
10
votes
5 answers

Handling the OnNavigatedFrom / OnNavigatedTo events in the ViewModel

I am trying to figure out a way for my ViewModel to handle saving or restore the page's state when the page is navigated From or To. The first thing I tried was to add an EventToCommand behavior to the page, but the events (OnNavigatedFrom and…
Jeff R
  • 263
  • 2
  • 4
  • 9
10
votes
1 answer

using MVVM light messenger with Silverlight 4 ChildWindow dialog class

Greetings! Am enjoying using MVVM light -great framework - has made my life much easier, and has removed a number of barriers that were proving difficult to overcome.... Question: I am attempting to setup a custom dialog box for editing messages…
10
votes
2 answers

prism vs mvvm light for UWP application

We have a working project in Windows 8.1 which is made compatible to Win 10. Now the requirement is to convert this project to UWP. In the earlier project, we have used PRISM as the framework for MVVM. Now the problem is that for UWP application,…
Aakansha
  • 559
  • 2
  • 7
  • 21
10
votes
2 answers

mvvm light - NavigationService / DialogService classes not found

Should be a simple answer, but I'm not seeing it. MVVM Light v5 introduced a NavigationService and DialogService. I wanted to make a sample application to play around with them. The advice seems to be that all i need do is register them in the…
SeeMoreGain
  • 1,263
  • 16
  • 36
10
votes
7 answers

How do you decouple your ViewModel properties validation from ViewModel?

I am using MVVMLight. This is my Department model/POCO class. I do not want to pollute it by any means. public partial class Department { public int DepartmentId { get; set; } public string DepartmentCode { get; set; } …
NoobDeveloper
  • 1,877
  • 6
  • 30
  • 55
10
votes
1 answer

EventToCommand don't exist in Mvvmlight toolkit WPF4.5

I'm using the latest MVVMLight Tookit at version 4.1.26.24928, and I'm writing a program using WPF 4.5. Now I can't use the EventToCommand in VS2012 XAML file, it says "EventToCommand" does not exist in the namespace…
TinySnake
  • 126
  • 1
  • 5
10
votes
1 answer

Proper way of using MVVM Light Messenger

What is the proper way to use Messenger class ? I know it can be used for ViewModels/Views communications, but is it a good approach to use it in for a technical/business service layer ? For example, a logging/navigation service registers for some…
Cybermaxs
  • 24,378
  • 8
  • 83
  • 112
10
votes
1 answer

Why doesn't RelayCommand RaiseCanExecuteChanged work in a unit test?

I'm using the current version of MvvmLight available on Nuget (4.1.23.0) and calling RaiseCanExecuteChanged does not appear to be doing anything in a unit test. The scenario is very simple, I have a command: public RelayCommand FooCommand { get;…
andrej351
  • 904
  • 3
  • 18
  • 38
10
votes
3 answers

Page navigation through ViewModel using MVVMLight in windows 8

I just started developing my brand new windows 8 application last week using mvvm light.I am familiar with mvvmlight WP7 navigation. How i can achieve the same in windows 8. Can any one suggest a better method to achieve the same in windows 8. I…
Rakesh R Nair
  • 1,736
  • 2
  • 12
  • 30
10
votes
2 answers

WPF using MVVM: DataBinding with RelativeSource

I have a control and within that control I have a resource with a data tempalte:
user101010101
  • 1,609
  • 6
  • 31
  • 52
9
votes
2 answers

How do I switch views from within a view?

I'm making a WPF application making use of the MVVM light framework. What I'm trying to do is have a login form in a view, when the user presses a button within that view it launches a LoginCommand for the attached ViewModel. From there I either…
benjgorman
  • 702
  • 10
  • 31
9
votes
2 answers

Dispatching to the UI thread still required when using MVVM Light?

I'm hoping this isn't too dumb a question: I just started using MVVM light (love it so far! ). In the "before time" (ie before the use of MVVML), I had to ui dispatch any code that would hit a property setter that had an INotifyPropertyChanged…
Joe
  • 321
  • 3
  • 12