mvvm-light

Mvvm light toolkit and navigate by frame

Hello, Do you have a tutoriel which explain navigate with uri. When my application start i load in my frame "Login.xaml" and his viewModel. When i click on my button "Log" (i use a relaycommand) i want that my frame load "Acceuil.xaml". how make it ? thx ...

Multiple view and multiple projects

Some body can share with me some example that use MVVM Light, where one view exists in each project (the solution has multiple projects, one for each view). What happen with the Locator, need to have one for each view in each project? How sincronize the view? How animate the initializacion of each view?. Thanks a lot ...

adding rows dynamically based on the records in database in listbox mvvm mvvm light

Hi, I have a listbox in which I am displaying the records from the database. Its coming one after the other in a single column. How to put the records programitically as 3 rows and 3 columns i.e. 3 records in a row, after that 3 records in a row. Kindly suggest? Thanks. ...

Building a ViewModel

Greetings, I have a ViewModel for a ProductCategory. The ProductCategory has a boolean Active field. Is is possible to have a single ProductCategoryViewModel and be able to get a collection of all ProductCategories and a collection of ACTIVE ProductCategories? Or, would I have to create an ActiveProductCategoryViewModel? I'm using MVV...

EventToCommand / DataContext

I've been using EventToCommand from the MVVM toolkit, but sometimes I the EventToCommand does not seem to be firing on the event that it is mapped to. I think this has something to do with setting the DataContext? At this point that is simply a guess. Perhaps a better question would be: I often hit the break point that the EventToComma...

Finding a Control e.g. Label and assign its Content at runtime mvvm wpf

Hi, We have one xaml file in our Skins folder where designer has developed some styles for the labels,radiobuttons or checkboxes. I need to find the control, Label in this xaml file and assign the content property at runtime in virewModel so that it can automatically displays the content as per the records in the database. How to achiev...

How to do Regions in WPF without Prism?

Specifically in MVVM Light toolkit? I've not dove into the Prism code yet to see what it does in regard to regions in a WPF UI. Seems like with the messaging and the ViewModelLocator in MVVM Light you could do a similar thing....Can you? Can anyone give some examples on how you could do this? Essentially I'd like to click on a button...

MVVM Light toolkit + Messenger

Hello, i have a class wich send uri to change page after login, but how can i make to send my new uri and my object "user" to the new page ?? public static class StatusUpdatePage { public static void Send(Uri uri) { Messenger.Default.Send<Uri>(uri); } public static void Register(object re...

Can't bind ICommand in VM to button Command in xaml

I create a VM based on MVVM light toolkit. In VM, there is a simple ICommand(RelayCommand) private RelayCommand _myCommand = null; public RelayCommand MyCommand { get { if (_myCommand == null) //set break point here for debug { _myCommand = new RelayCommand(() => ...

How to run a function on a background thread for Windows Phone 7?

Hi All, I'm using MVVM Light to build a WP7 (Windows Phone 7) application. I wish to have all the work performed by the Model to be run on a background thread. Then, when the work is done, raise an event so that the ViewModel can process the data. I have already found out that I cannot invoke a Delegate asynchronously from an WP7 app....

Adding Models to the silverlight wcf ria services enabled application

Hi I have started using the MVVm light2 framework for the wcf ria enabled silverlight 4.0 application. I was able to add a folder named "Models" to ASP .Net application that hosts the silverlight application, I added a class to this folder, and i am able to set the properties and all for this in my silverlight application, but once i ...

MVVM Light IsInDesignMode property not working

Hello, I'm having an issue where the property IsInDesignMode is not returning the expected value of true when running the solution in VS or Blend. My environment consists of Win Server 2008 R2, VS2010 Pro, Blend 4 and MVVM Light V3. I run my Silverlight 4 solution in Debug mode from VS and Blend, and IsInDesignMode is always false. A...

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 am missing? <Grid x:Name="LayoutRoot">... <StackPanel> <Button Content="THIS BUTTON WO...

MVVM Light - WP7 Page/Application Events

Is there a way to use MVVM Light to handle application events like Closed, Deactivated, Activated, etc? ...

"Resource with the name {Locator} cannot be found" Error when using mvvm-light user control

Hello everybody, i am using the mvvm light toolkit to create a WPF application. I created a user control and a corresponding ViewModel. I created a ViewModel property in the ViewModelLocator. I bound the user controls datacontext to the property in the Locator class. When i edit the User Control in Blend or the VS Designer everything se...

Elegant handling of a Collection Change that requires changes on the dispatcher thread.

Here's my situation: I've got a User interface ItemsControl "ResultsPresenter" (WPF) pulling from a ListCollectionView that uses a BindingList "Results" from a non-UserInterface class as the ListCollectionView.Source property. Whenever I make a change to "Results" such as an add operation, I get a NotSupportedException, insisting tha...

WP7 - Using Messenger.Default.Send(pageuri) in ViewModel. Without registering for this message anywhere, still navigation is working. How?

Hi, I am using MVVM Light toolkit "Messenger" class- A Messenger class (and diverse message types) to be used to communicate within the application. Recipients only receive the message types that they register for. Additionally, a target type can be specified, in which case the message will only be transmitted if the r...

When does Application_Launching event fire?

I have been playing with the latest templates (patched for Beta tools) and application life cycle. When I was looking for a place to initialize the DispatchHelper, I noticed that the Application_Launching event handler was being executed AFTER the MainViewModel constructor has executed. Is this the expected behavior? ...

mvvm light PassEventArgsToCommand break app in ListBoxDragDropTarget

Hi I'm trying to pass eventargs to comman that I bind in ViewModel. Everything works fine if I don't use PassEventArgsToCommand="True". But If put PassEventArgsToCommand="True" than app break. Did you have similar problem? <Controls:ListBoxDragDropTarget Grid.Column="1" AllowDrop="true" HorizontalContentAlignment="Stretc...

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 users send to each other. I am attempting to construct a silverlight custom dialog box usin...