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
9
votes
3 answers

How to receive DialogResult using mvvm-light Messenger

I'm trying to use the mvvm-light messenger capability to open a custom confirm password dialog in my view, triggered by a command in my viewmodel. I think I understand the usage of Messenger.Default.Register and Messenger.Default.Send. But how do I…
nabulke
  • 11,025
  • 13
  • 65
  • 114
9
votes
1 answer

MVVM Light Message types: When to use each type?

I've just started learning Silverlight with the MVVM Light framework. Most recently I've started getting into the Messenger features in MVVM Light. So far I've downloaded and dug into the Clean Shutdown example posted by Laurent and have a basic…
Jason Towne
  • 8,014
  • 5
  • 54
  • 69
9
votes
2 answers

Firing RelayCommand from CodeBehind bound to VM

I wonder if I can create a RelayCommand on my ViewModel like this: public RelayCommand> MyCommand { get; set; } ctor: MyCommand = new RelayCommand>(DoSomething); And from the Code behind XAML, I get…
Houman
  • 64,245
  • 87
  • 278
  • 460
9
votes
2 answers

UWP Windows 10 app crashes in release mode but works fine in debug mode

My UWP app is crashing in Release mode and works fine in Debug mode but I can't put my finger on what the issue is but I know it's related to a combination of raising an event from System.Threading.Timer and MVVMLight. I created an new dummy…
Thierry
  • 6,142
  • 13
  • 66
  • 117
9
votes
3 answers

MVVM-Light, firing events from a button inside a data grid column template

MVVM light has been a pleasure to learn, but here I am stuck. The problem is event firing. In the code below, one button the works and fires events. The other button doesnt. No binding errors are reported in the output. Is there anything obvious I…
nachonachoman
  • 802
  • 1
  • 13
  • 29
9
votes
1 answer

RaiseCanExecuteChanged COM Exception during Navigation?

Update Uploaded sample project: https://github.com/subt13/BugSamples I have reproduced an error that has been occurring in a Windows 10 UAP application that utilizes the MVVMLight framework. I receive the error below during navigation while the…
O.O
  • 11,077
  • 18
  • 94
  • 182
9
votes
1 answer

xaml parse error on interaction triggers wp8.1(silverlight)

I have a working solution for WP8.0. But I needed to upgrade to get access to WNS. I have succeeded in adding WNS to the upgrade solution in the main menu works. But after Upgrading to wp8.1(silverlight), I have had some weird errors, that only…
JTIM
  • 2,774
  • 1
  • 34
  • 74
9
votes
2 answers

How to register a class that implements multiple interfaces in MVVM Light's SimpleIoc?

Let's say I have a couple of interfaces and a class that implements them: public interface ISomething1 { /* blablabla */ } public interface ISomething2 { /* blablabla */ } public class Service : ISomething1, ISomething2 { /* blablabla x 2 */ } I'd…
pangabiMC
  • 784
  • 5
  • 20
9
votes
3 answers

MVVM Light Messenger Class

Can anybody provide samples/links/simple-illustrations/videos/demos on how to use the messenger class in MVVM Light?
Amsakanna
  • 12,254
  • 8
  • 46
  • 58
9
votes
3 answers

What is the importance of RaisePropertyChanged?

I am currently learning MVVM and i don't understand how RaisePropertyChanged is important For example this function : public City SelectedCity { get { return selectedcity; } set { …
user2505650
  • 1,293
  • 6
  • 20
  • 38
9
votes
3 answers

Handling Mouse Events in MVVM in WPF

I am Using MVVM with WPF. i am halted in a way, i want your views about this. i am firing Mouse Events using MouseBehaviour.cs class , Is there any other way to handle Mouse Events in MVVM WPF using System.Windows; using…
Harjeet Singh
  • 388
  • 2
  • 6
  • 22
9
votes
2 answers

Strange behavior with actions, local variables and garbage collection in MVVM light Messenger

I am having a really strange problem with the Messenger system in MVVM Light. It's hard to explain, so here is small program that demonstrates the issue: using System; using GalaSoft.MvvmLight.Messaging; namespace TestApp { class Program { …
Oliver
  • 11,297
  • 18
  • 71
  • 121
9
votes
2 answers

Design View is not opening in Blend 2013

I saw set of people have the same problem and I tried some it, But I do not know why I still cannot see the design view!! The output type is Windows Application. Design view is working properly in VS 2013. I created this project using MVVM Light…
bunjeeb
  • 1,096
  • 1
  • 17
  • 32
9
votes
4 answers

MVVM RelayCommand CanExecute

I'm implementing an RelayCommand with an execute and an canExecute part. The RelayCommand works when it is without the canExecute part, however when I add the canExecute part, the command locks the button. The RelayCommand only checks whether or not…
JonasN89
  • 1,386
  • 2
  • 11
  • 23
9
votes
1 answer

Use MVVM Light's Messenger to Pass Values Between View Model

Could someone be so kind as to explain MVVM Light's Messenger for me? I was reading a post on StackOverflow here: MVVM pass values between view models trying to get this. The documentation on MVVM Light's not that great at this point so I'm…
DanteTheEgregore
  • 1,530
  • 5
  • 23
  • 44