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

Adding controls dynamically in WPF MVVM

I am working on a dynamic search view wherein clicking a button should add a new row containing 3 combobox and 2 textboxes. How should I go about doing this?
spiritqueen
  • 689
  • 1
  • 6
  • 14
20
votes
4 answers

Show dialog with MVVM Light toolkit

I have a ViewModel that needs to show a modal window (using ShowDialog()) on a button click. The ViewModel catches the click command, but I don't want to do window.ShowDialog() within my ViewModel. I know there is a DialogMessage in MVVM Light, but…
Tejash
  • 201
  • 1
  • 2
  • 3
19
votes
3 answers

How to navigate through windows with MVVM Light for WPF?

I've just started a new project in which the presentation layer will be done by WPF and MVVM Light by GalaSoft. I need a lot of views and it's not clear to me how to manage navigation through windows. First of all, the templates offered in MVVM…
zero51
  • 801
  • 2
  • 8
  • 20
19
votes
1 answer

Alternatives to Prism + MEF for modular MVVM apps

My team and I are beginning to plan the development of a modular application which will likely multi-target WPF & Silverlight. I personally have some experience using the older version of PRISM to build a composite Silverlight app using the MVVM…
Steve Brouillard
  • 3,256
  • 5
  • 41
  • 60
18
votes
2 answers

Validation Using MVVM Light in a Universal Windows App

After done with setting up MVVM Light in a Universal Windows App application, I have the following structure, and I wonder what is the cleanest way to do validation in 2017 using UWP and mvvmlight to notify users with errors and possibly reset the…
usefulBee
  • 9,250
  • 10
  • 51
  • 89
18
votes
5 answers

Missing System.Windows.Interactivity in Silverlight 4 - mvvm light tutorial

I'm trying to follow this MVVM Light Toolkit V3 Alpha 2: EventToCommand behavior tutorial. I'm using vs2010 with silverlight 4. I dont have expression blend. The tutorial states that In addition, you need the System.Windows.Interactivity.dll I…
handles
  • 7,639
  • 17
  • 63
  • 85
18
votes
6 answers

Unblocking a DLL on a company machine. How?

I am trying to test out MVVMLight but the DLLs that come with it are BLOCKED. I have read about it and I am told to click the UNBLOCK in the file property.. but that doesnt exist for me.. Then I found out of a program called STREAMS that is suppose…
punkouter
  • 5,170
  • 15
  • 71
  • 116
18
votes
4 answers

How do I modify ONLY the right (or left, top, bottom) value of a WPF control's Margin property?

This is quite easy to do from code-behind: var button = new Button(); var margin = button.Margin; margin.Right = 10; button.Margin = margin; In XAML, however, I'm limited to the following:
bugged87
  • 3,026
  • 2
  • 26
  • 42
17
votes
4 answers

What is a good way to bubble up INotifyPropertyChanged events through ViewModel properties with MVVM?

I'm trying to figure out the best way to bubble up PropertyChanged events from nested Properties in my ModelView. Say I have my ModelView PersonModelView which has a Property PersonModelView.Address. Address in turn has a property City. When I bind…
Geoff
  • 1,634
  • 16
  • 25
17
votes
7 answers

MVVM Light + Blend designer view error: Cannot find resource named 'Locator'.

The application runs fine but i could not see my design in the designer view. It says Cannot find resource named 'Locator'. Obviously, i did not change anything in the code, i just did the data binding using the data binding dialog... anyone facing…
Linus
  • 171
  • 1
  • 3
16
votes
5 answers

MVVM : how to pass parameter to ViewModel's constructor

I'm using L. Bugnion's MVVM Light Framework. What are some of the recommended approaches to pass parameters such as Customer's ID to ViewModel's constructor? Edit: The parameter I need for each ViewModel is not something that is shared across…
Yeonho
  • 3,629
  • 4
  • 39
  • 61
16
votes
3 answers

Passing event args and sender to the RelayCommand

How do you get event sender when using RelayCommand?
incognito
  • 2,243
  • 3
  • 14
  • 16
16
votes
2 answers

Not enough quota is available to process this command -WPF

I am working on a WPF application. I have implemented error handling and implemented error mail sending feature for this application. So admin will get the error message if any error happened in the application. My issue is we are always getting…
Ranish
  • 877
  • 2
  • 10
  • 30
15
votes
1 answer

MVVM-light + RIA Services best practices

I would like to start a collection of MVVM-light (w/ RIA Services) Best Practices. There are a number of items I have found to be helpful best practices or best approaches, but would like to hear from others using the MVVM-light toolkit and see…
Ryan from Denver
  • 871
  • 9
  • 16
15
votes
3 answers

MVVM light - how to access property in other view model

I'm using mvvm light to build a Silverlight application. Is there a code snippet that shows how to access a view model's property or command from within another view model or user control's code behind? I guess it's simple, but I somehow missed…
Ueli Sonderegger
  • 153
  • 1
  • 1
  • 6