Questions tagged [mvvm-foundation]

MVVM Foundation is a library of classes that are very useful when building applications based on the Model-View-ViewModel philosophy. The library is small and concentrated on providing only the most indispensable tools needed by most MVVM application developers.

mvvm-foundation has certain pre-defined classes by using which we can create applications based on model-view-viewmodel pattern very easily. You can find more about mvvm-foundation in the below link.

http://mvvmfoundation.codeplex.com/

Below is a link having good examples using mvvm-foundation.

http://www.codeproject.com/Articles/173630/MVVM-sharp-Episode-2

29 questions
21
votes
5 answers

Creating a clickable image in WPF

I want to make a user control that shows an image and can invoke a command when clicked. Later I want to bind a list of these controls to a list of products.
mico
  • 1,816
  • 1
  • 18
  • 27
7
votes
2 answers

Draw rectangle when mouse dragged using MVVM in WPF

Below is my xaml. I have an image inside a canvas. I want to draw rectangle on the image when mouse is dragged on the image. I did it successfully in WPF. But now I want to do it in MVVM. Instead of having the event handlers in code behind I want to…
Narendra
  • 3,069
  • 7
  • 30
  • 51
6
votes
2 answers

C#: Extending from more than 1 class

Suppose I have a ViewModel TabViewModel that Extends ObservableObject the class for ViewModels in the MVVM Foundation Framework. Then I also have a EditorTabViewModel that extends TabViewModel, Now I need to extend DependencyObject to implement…
Jiew Meng
  • 84,767
  • 185
  • 495
  • 805
5
votes
3 answers

MVVM Light Toolkit - RelayCommands, DelegateCommands, and ObservableObjects

I just started experimenting with Laurent Bugnion's MVVM Light Toolkit. I think I'm going to really like it, but I have a couple questions. Before I get to them, let me explain where I'm coming from. I currently use a combination of Josh Smith's…
devuxer
  • 41,681
  • 47
  • 180
  • 292
5
votes
2 answers

MVVM Foundation vs MVVM Toolkit

Can someone explain the differences between the MVVM Foundation and the MVVM Toolkit? They seem to have a lot in common.
Sauron
  • 16,668
  • 41
  • 122
  • 174
4
votes
2 answers

MVVM ViewModel to View Messaging

MVVM question. Messaging between ViewModel and View, how is it best implemented? The application has some points of “user communication” such as: “You have entered comments for this selection. Do you wish to save or discard” when the value of a…
TheZenker
  • 1,710
  • 1
  • 16
  • 29
4
votes
2 answers

Using MVVM Foundation Messenger to Show Dialog

I'm building a WPF app and trying to conform to MVVM best practices. I'm using the MVVM Foundation framework and noticed the Messenger class, which I've read should be used for handling dialogs in WPF. This sounds great, but I'm totally not…
senfo
  • 28,488
  • 15
  • 76
  • 106
2
votes
2 answers

Showing Dialogs in MVVM & Setting dialog options

I am just wondering is this the way to show dialogs in MVVM? public ICommand OpenFileCommand { get { if (_openFileCommand == null) { _openFileCommand = new RelayCommand(delegate { var strArr =…
Jiew Meng
  • 84,767
  • 185
  • 495
  • 805
2
votes
1 answer

MVVM Foundation: Why return ICommand when its defined as RelayCommand

i am using the SampleModel project from MVVM Foundation.Why is ICommand returned when _decrementCommand is declared as RelayCommand. I know RelayCommand inherits ICommand but won't is be clearer to just return a RelayCommand? public ICommand…
Jiew Meng
  • 84,767
  • 185
  • 495
  • 805
2
votes
2 answers

MVVM Foundation: How to close Application Window from ViewModel

I am using MVVM Foundation but I think its quite straight-forward and not really framework specific. My setup is as follows: StartViewModel - has a ExitCommand that returns a RelayCommand/ICommand public ICommand ExitCommand { get { return…
Jiew Meng
  • 84,767
  • 185
  • 495
  • 805
2
votes
1 answer

mvvm wpf c# Entity framework tutorial

Share some good link for building application using mvvm wpf EF4 using C# .I need tutorial /video /book that that start from basic concept of mvvm using EF and C# and cover at least major topics for building a complete project/application for an…
1
vote
2 answers

Spring AOP + MVVM Foundation + PropertyChanged

I'm using Spring.Net 1.3.1 alongside MVVM Foundation to apply cross-cutting to my viewmodels. I've noticed that if I assign a property changed handler before the object is converted to a proxy for cross-cutting that the proxy engine does not apply…
coreyperkins
  • 172
  • 2
  • 4
  • 17
1
vote
1 answer

Need to build a WPF application with good architecture

I am trying to start a WPF application towards self learning curve, i have explored quite about WPF and now its time for me to start an application for myself. Many thanks to them who contributed excellent articles to public here in internet. I…
Krishna.N
  • 1,123
  • 2
  • 9
  • 13
1
vote
1 answer

Use Action when register Method in Messenger

I'm using mvvm pattern, and have the next situation. For example exists a method: void LockPressed(KeyEventArgs e) { // Code } And here I register it: App.Messenger.Register("LockPressed",…
MCv
  • 118
  • 1
  • 10
1
vote
2 answers

Can I have multiple ViewModel for a View in WPF

Can I have multiple ViewModel for a View in WPF? Because some times we need to show the view only in simple view format and sometimes the same view has to shown in editable format. Hence we can create seperate view models for each. So is there any…
WPFProgrammer
  • 251
  • 2
  • 8
1
2