2

I was wondering if anyone knew of a great example of using the MVVM pattern for a Silverlight application that does not utilise a data grid?

Most of the examples I have read see links below and books such as Pro WPF and Silverlight MVVM by Gary Hall use a silverlight application with a datagrid. Don't get me wrong, these are all great examples.

See also:

However some recent demo projects I have been working are not necessarily dealing with data grids but I would still want to implement this pattern..

Community
  • 1
  • 1
Aim Kai
  • 2,934
  • 1
  • 22
  • 34
  • 2
    Good question, not really looked at MVC or MVVM much yet but it is annoying when nearly all tutorials just focus on displaying data in a grid. – Fishcake Jan 13 '11 at 15:23
  • 1
    I'd recommend looking into using "MVVM light", look it up – Notter Jan 13 '11 at 15:56
  • @Notter - the MVVM light framework is a very useful framework indeed :) I had another scan through the website, as I had not visited it for a while, there is a drag and drop and a messaging example - see links http://www.galasoft.ch/mvvm/getstarted/ - although these mostly focus on the aspects of what the MVVM framework can provide. I was looking for something more general. – Aim Kai Jan 13 '11 at 16:17

3 Answers3

1

This Stack Overflow question contains a lot of examples in the answers you may find useful. Good Silverlight-MVVM Practice Example

Community
  • 1
  • 1
Greg Levenhagen
  • 924
  • 7
  • 14
0

I have just been writing a serious of blog posts about Silverlight, RIA, POCO and Oracle. At our work we don't have the luxery of SQL Server or the Entity Framework, so we had to figure out how to make RIA work with Oracle.

In the process, I wrote a sample application to explain all that we learned. It uses MVVM. You can check it out here (there is a datagrid involved, but it's on a secondary tab - it's not the main focus of the application).

http://www.chrisholmesonline.com/2011/01/13/silverlight-ria-services-with-poco-oracle-part-i/

Chris Holmes
  • 11,444
  • 12
  • 50
  • 64
0

If you download Prism which is a composite framework for building Silverlight based MVVM applications, you will notice that it comes with compilable/runnable examples which make use of the framework and are great examples of MVVM.

On a side note focus on understanding MVVM concepts with disregard to Silverlight as the methodology is applicable to other technologies and is not a Silverlight only methodology. This will broaden your results as you begin searching for an understanding of what MVVM is.

Aaron McIver
  • 24,527
  • 5
  • 59
  • 88
  • I wonder about the validity of your comment of MVVM being applicable to other technologies. Certainly that should be true, but succesfully applying MMVM with a technology that does not offer the same level of databinding that comes with SL/WPF sounds unlikely. – Ralph Shillington Jan 20 '11 at 18:56
  • @Ralph I stated it was not a SL only methodology. As you have mentioned WPF also makes heavy use of data binding and thus MVVM. With the MVVM approach surfacing from within the MS community I understand that it was and currently is MS centric but the concepts that MVVM brings can span technologies of which do not need to be MS focused. – Aaron McIver Jan 20 '11 at 19:01