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
1
vote
4 answers

Cannot find resource named 'ViewModelLocator' exception

I am trying to use ViewModelLocator by declaring it as a resource in App.xaml. Its a very simple class as follows: public class ViewModelLocator { public ShellViewModel ShellPage { get { …
user2788792
  • 103
  • 2
  • 8
1
vote
1 answer

MVVM Light - communicating an items selection to the ViewModelSeletor

The latest MVVM Light toolkit uses IoC in the ViewModelLocator (VML) to serve up instances of ViewModels. Those instances are served from Read Only instance properties (i.e Not Static) The samples show a MainViewModel exposed from the VML but not…
Pat Long - Munkii Yebee
  • 3,592
  • 2
  • 34
  • 68
1
vote
0 answers

Losing blendability with mvvm light when trying to connect to sqlite in designmode

I was coding happily ever after a personal project, when I noticed that I lost my blendability with mvvm light framework on my view models. Trying to figure out why, I started digging into my constructors, adding and removing and cursing in arcane…
Noctis
  • 11,507
  • 3
  • 43
  • 82
1
vote
0 answers

Onkeydown in Textbox how to select and highlight a DataGridRow in WPF MVVM

I have a textbox for search.Now when I will type some text then if the text matches one column of a datagrid row then that entire row will be highlighted and selected .Also I need that selected row data.How to implement it in WPF and I am using MVVM…
Anindya
  • 2,616
  • 2
  • 21
  • 25
1
vote
2 answers

How to start a radiobutton checked = true in a WPF MVVM application

Hi Basically I have a WPF application using the MVVM pattern. This is my ViewModel: namespace enLoja.WPF.ViewModel.Relatórios { public class SEL_PG_C_ALIViewModel : ViewModelBase { private readonly ICAD_EF_C_ALIService…
1
vote
1 answer

Parent Child Datagrids have different ItemsSource in MVVM

I have a DataGrid and in that DataGrid's DataGrid.RowDetailsTemplate I have put another DataGrid.Now my first Datagrid is having ItemsSource="{Binding MatchObsCollection}" and My inner Datagrid which is in my DataGrid.RowDetailsTemplate has separate…
Anindya
  • 2,616
  • 2
  • 21
  • 25
1
vote
2 answers

Inputbinding - Delay Between Mouse Clicks, EventToCommand Works Fine

Up until today I've been using MVVM Light's EventToCommand for event handling in XAML. I decided to try out InputBinding for mouse events and so far the results have been far from pleasing. I'm guessing I'm doing something wrong because there's a…
Jason D
  • 2,634
  • 6
  • 33
  • 67
1
vote
2 answers

WPF TreeView bound to ObservableCollection won't update when adding

Have browsed similar answers, but I just can't find the problem. I'm using MvvmLight, and have bound a WPF TreeView to an ObservableCollection in the ViewModel. The tree shows fine, but if I add members to the ObservableCollection later on, the…
Andrew
  • 817
  • 2
  • 10
  • 21
1
vote
1 answer

Editing XML in Windows Store using MVVM and Message

In my application I am creating XML in App.xaml.cs like this: public async static void CreateBadgesXML() { StorageFolder sf = await ApplicationData.Current.LocalFolder.CreateFolderAsync("Data", CreationCollisionOption.OpenIfExists); …
Tomasz Kowalczyk
  • 1,873
  • 2
  • 23
  • 33
1
vote
1 answer

MVVM inter-model validation

I have three models and viewmodels that depend on each other for validation. Additionally, the models must react to each others' changes. For example if ModelA.Prop1 is modified, ModelB.Funds must repopulated from the DB. How do you implement this…
LostInComputer
  • 15,188
  • 4
  • 41
  • 49
1
vote
1 answer

WinRT XAML IsEnabled fires only once

I have a button on an AppBar which I have set to become enabled when a property in the ViewModel becomes true. For some reason the IsEnabled binding is only being checked the first time the AppBar is shown. Have I missed something? Here is my button…
Sico
  • 1,183
  • 1
  • 10
  • 16
1
vote
3 answers

WPF MVVM Light: Command.RaiseCanExecuteChanged() doesn't work

I have something like this in my ViewModel: public enum WorkState { Idle, Working, Stopping }; public class MainViewModel : ViewModelBase { public const string StatePropertyName = "State"; private WorkState _state = WorkState.Idle; …
Alex P.
  • 3,697
  • 9
  • 45
  • 110
1
vote
1 answer

How to Use Ninject with MVVM Light

I am trying to replace SimpleIoc with Ninject 3 in a WP7 application. So far I have Portable.CommonServiceLocator.NinjectAdapter in my app and it contains a service locator but everytime I try to use, my app crashes so I must be missing…
chobo2
  • 83,322
  • 195
  • 530
  • 832
1
vote
0 answers

Multiple WebViews + Binding the Source Property

I am creating an application where the user will be able to navigate between multiple WebViews. However only one WebView will be visible and the rest are collapsed. So in my code behind I have an array of WebViews. The main reason for doing this is…
KrispyDonuts
  • 1,262
  • 2
  • 18
  • 37
1
vote
1 answer

Blendability for ViewModel instances in MVVM Light

I've used MVVM before, but MVVM-Light confuses the hell out of me, so I'm sorry if this is dumb (it's just that there's barely any documentation). Anyways, I've learnt that you use the ViewModelLocator only for "singleton" views from Laurent's…
MasterMastic
  • 20,711
  • 12
  • 68
  • 90