mvvm

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...

WPF MenuItem ViewModel Command

Hi, I am fairly new to WPF and am struggling a little with a scenario. I have a menu which has menu items. When one of these menu items gets clicked a method needs to be called that will do something based upon the text displayed associated with that menu item. So for example, the menu item's content was "test" so I would need to do som...

Application Logic and Smart Client Application

we are designing a application with WPF/WCF... where we had lot of business leaked into the client code so inorder to avoid and make it clear we want to use the Domain Driven design . But where exactly my domain model will Sit .. in Server or client. Note :To explain more about architecture we have WPF with MVVM we are bin...

Where to Store ID Field In Silverlight

I am trying to use the MVVM pattern, and I am wondering where I place an ID value. Do I create a TextBlock that has its visibility property set to collapsed? Or is there a better place to store this kind of data? Currently the command parameter is set to: CommandParameter="{Binding ElementName=Name,Path=Text}" But I'd rather it be ...

Windows Phone 7, MVVM, Silverlight and navigation best practice / patterns and strategies

Whilst building a Windows Phone 7 app. using the MVVM pattern we've struggled to get to grips with a pattern or technique to centralise navigation logic that will fit with MVVM. To give an example, everytime the app. calls our web service we check that the logon token we've assigned the app. earlier hasn't expired. We always return som...

Anyone doing here WPF with MVC/MVP pattern ?

Would you mind tell me why? :) ...

Where is the datacontext for the CustomerViewModel in the official MSDN MVVM article ?

Hello, I speak about josh smith article. can anyone show me please how the CustomerView.xaml specifically this:j <TextBox x:Name="firstNameTxt" Grid.Row="2" Grid.Column="2" Text="{Binding Path=FirstName, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged}" Validation.ErrorTemplate="{x:Null}" /> Why is ther...

I've got a ComboBox that's giving me grief in WPF using the MVVM pattern

Here's my code: <ComboBox Grid.Column="1" Grid.Row="9" ItemsSource="{Binding Path=PriorityEntries}" SelectedItem="{Binding Path=Priority,Mode=TwoWay}"/> The comboBox is bound properly with PriorityEntries, and when i change the value of the comboBox the "set" of the bound property(Priority) is called setting it to what it needs to be....

where store event handler method in WPF - MVVM

Hey, Where should I store event methods for button Click event ?Normally it's store in code behind of wpf page, <Button Name="myButton" Click="myButton_Click">Click Me</Button> but in MVVM it should be store in other view-model class and bind to click property of button like that?? <Button Name="myButton" Click="{Binding StaticReso...

Validity of GUI design patterns under linux

I am investigating a switch from windows to linux and i struggle to find samples of design patterns applied in this world. The application is a classic client server with detailed forms for each business entity. It will be taking user input, do some validation checks, a few calculations, and save them to database. It will also have list...

MVVM Light is too fast :)

Hello, I have a simple WM7 Page with a TextBox. Futher, I assigned EventToCommand (a RelayCommand<string>) to this TextBox, reacting to the TextChanged event. For testing pourposes I made additional method TextBox_TextChanged in the page's code behind. Both the command and TextBox_TextChanged print a message box with the textbox content...

what needs to be done handle dialog windows in MVVM

what all necessary steps to be done to handle dialog windows in MVVM. ...

DataTemplate defautl visibility for ContentControls

In my MVVM based WPF application I have a lot of different ViewModel types that dynamically loaded into ContentControls or ContentPresenters. Therefor I need to explictly set what DataTemplate is to be used in XAML: <ContentControl Content={Binding SomePropertyOfTypeViewModel} ContentTemplate={StaticResource someTemplate} /> Now my pro...

WPF MVVM Get Parent from VIEW MODEL

In a MVVM WPF application. How do you set a second windows parent from the ViewModel? example: view1 viewModel1 viewModel1's command calls: var view2 = new view2 view2.Owner = <----This is the problem area. How do I get view1 as the owner here from the viewModel? view2.Show() EDIT: See accepted answer below, then read the follo...

Bind a SL4 TreeView to an IGrouping using Caliburn

I am just starting in the SL world and am trying to use the Caliburn NavigationShell as my starting point. I converted the solution to SL4 and use Caliburn from the trunk . To create the basic navigation, I am a bit unsure (well, quite), how I can display the original StackPanel of Buttons as a collapsible Treeview. I changed ITaskBarI...

what are the necessary steps to be keep in mind, if anybody wants to convert Normal WPF project to MVVM enabled one?

If anybody wants to convert a Normal WPF project to MVVM enabled one, what are the main points to be keep in mind while restructuring the entire application. What are the main hurdles to accomplish the task? ...

NOOB Challenge Implementing MVVM in WPF

To preface, this is my first attempt at MVVM... I buy it, I'm just having a little trouble implementing it. I'm building a utility to assist with managing a course. I have a COURSE object which contains a few properties and methods as well as a collection of MODULES. Each module has a few properties, methods and a reference to a PRESENT...

How do I keep my DataService up to date with ObservableCollection?

I have a class called CustomerService which simply reads a collection of customers from a file or creates one and passes it back to the Main Model View where it is turned into an ObservableCollection. What the best practice for making sure the items in the CustomerService and ObservableCollection are in sync. I'm guessing I could hooku...

WPF MVVM UserControl Binding "Container", dispose to avoid memory leak.

For simplicity. I have a window, with a bindable usercontrol <UserControl Content="{Binding Path = BindingControl, UpdateSourceTrigger=PropertyChanged}"> I have two user controls, ControlA, and ControlB, Both UserControls have their own Datacontext ViewModel, ControlAViewModel and ControlBViewModel. Both ControlAViewModel and Contr...

Dynamically specify and change a Silverlight DataGrid's columns during runtime (MVVM)

What's the best method of dynamically specifying DataGrid columns in the Silverlight DataGrid control at runtime following the MVVM pattern? What I'd like to do would be bind the "DataGrid.Columns" property to a property in my ViewModel so that, if the user adds/removes columns, I simply update the ViewModel property and the DataGrid wo...