mvvm-light

MvvmLight EventToCommand and WPFToolkit DataGrid double-click

Trying to figure out how to use EventToCommand to set a datagrid double click handler for rows. The command lives in the viewmodel for each row. Just that much out of my experience, since I haven't used interactions yet. Thanks. I would have used mvvmlight tag, but I don't have high enough rep yet to make new tags. ...

SL3 Nav framework + MVVM ligh

Hi All, Thanks for taking time to read through my question. Any guidance is really appreciated. I am using SL3 Navigation framework in my LOB application. I m currently using MVVM Light as the framework guidance. I have a datagrid consisting of employees and when the "user" clicks on "employee id link" in the datagrid, i am transferr...

Diagramming in Silverlight MVVM- connecting shapes

Hi, have I have a quesition regarding MVVM pattern in the uses case of diagramming. What I have so far is a list of Items which are my Shapes. ObservableCollection<ItemsViewModels> Items; and a Collection of Connection of Items ObservableCollection<ConnectionViewModel> Each ItemViewModel has an ID and a ConnectionViewModel has t...

MVVM load data during or after ViewModel construction?

My generic question is as the title states, is it best to load data during ViewModel construction or afterward through some Loaded event handling? I'm guessing the answer is after construction via some Loaded event handling, but I'm wondering how that is most cleanly coordinated between ViewModel and View? Here's more details about my ...

Pass or Get a value from Parent ViewModel down to Sub-ViewModel?

I am using the MVVM Light framework as well as Unity for DI. I have some nested Views, each bound to a corresponding ViewModel. The ViewModels are bound to each View's root control DataContext via the ViewModelLocator idea that Laurent Bugnion has put into MVVM Light. This allows for finding ViewModels via a static resource and for contr...

Casting in MVVM Light CommandParameterValue

here is my Problem, I want to pass the integer 1 when this canvas is pressed. Every time I click the canvas, I get a An unhandled exception of type 'System.InvalidCastException' occurred in GalaSoft.MvvmLight.dll. Now I could make my life easier and just do the RelayCommand to accept a String instead of int but for the sake of learning. ...

MVVM- How can I select text in a textbox?

Is there a MVVM way to select text in a textbox? The MVVM framework that I am using is Laurent Bugnion's MVVM Light Toolkit. ...

MVVM Light toolkit - maintained? Here today - gone tomorrow? ...

Hi there, I have been taking a look at mvvm light toolkit, i must admit i haven't got a lot of experience with it but i live what i see.. I did use the mvvm toolkit (microsoft) but currently use vs 2010 and no templates are available as yet. I was looking for some insight into mvvm light toolkit... Is it always maintained ? i..e its...

What is the standard convention for defining nested view:viewmodel mapping in MVVM Light

so in classic MVVM examples ive seen DataTemplate definitions are used to map up View Models to Views, what is the standard way to do this in MVVM Light framework, and where should the mappings be located? Following are examples of what I'm doing now and what I'm talking about, blendability is important to me! Main Window: <Window xml...

Do I need a view controller for MVVM-light in Silverlight?

I have the following question regarding MVVM light: what "drives" the UI? I see I can have a ViewModel per View I am showing; the ViewLocator handles all the ViewModels (for caching as I understand). But what is driving the UI? If I have a Command defined in my ViewModel that says "ShowDetail"; do I have to write the code for displaying...

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 the same problem? ...

MVVM Light - master / child views and dependency properties

I'm getting an odd problem when implementing a master / child view and custom dependency properties. Within my master view I'm binding the view model declaratively in the XAML as follows: DataContext="{Binding MainViewModelProperty, Source={StaticResource Locator}}" and my MainViewModel is exposing an observable collection which I'm b...

Silverlight MVVM master and main detail views

I'm developing an app and need some guidance on the best approach... For instance I have a main view using its viewmodel to retrieve many recipes. I want to be able to bind each recipe to a recipe user control within an items control and then each control will be responsible for instantiating it's viewmodel. Should I use a dependency p...

MVVM Light Toolkit samples

Does anyone know opensource WPF applications created using MVVM Light Toolkit? Or any samples? ...

MVVM light - how to access property in other view model

Hi, 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 something. Ueli ...

MVVM- How would I go about propagating settings between my main view-model (and other view-models) and my settings dialog?

I am building a settings dialog for my application and right now all of the settings correspond with settings on the main view-model, but as I add more view's and view-models some may not. I need to know what the best practice is for loading the current settings into the settings dialog and then saving the settings to thier correspondi...

MVVM Light Toolkit throws an System.IO.FileLoadException

I'm running VS 2010 along with Expression Blend 4 beta. I created a MVVM Light project from the supplied templates and I get a System.IO.FileLoadException when I try to view the MainWindow.Xaml in VS 2010 designer window. The template already references System.Windows.Interactivity. Here are the details of the exception: System.IO.Fil...

Dialogs (Real ones)

Having tried a number of different solutions I keep coming back to this. I need a Window.ShowDialog, using the ViewModelLocator class as a factory via a UnityContainer. Basically I have a View(and ViewModel) which on a button press on the the view needs to create a dialog (taking a couple of parameters in its constructor) that will proc...

RelayCommands overriding the "IsEnabled" of my buttons.

RelayCommands overriding the "IsEnabled" of my buttons. Is this is a bug? Here is xaml from my View and code from my ViewModel <Button Grid.Column="0" Content="Clear" IsEnabled="False" cmd:ButtonBaseExtensions.Command="{Binding ClearCommand}" /> public RelayCommand ClearCommand { get { return new RelayCommand(() => Mes...

Silverlight Navigation using Mvvm-light(oobe)+MEF?

What is the best approach for navigating between UserControls/Pages(out of browser experience)? I'm fairly new to Silverlight and even newer to the mvvm pattern. How well does the Navigation Framework Integrate with the MVVM Light Toolkit? A snippet for general application flow control with the two would be great. The plan was to use...