tags:

views:

956

answers:

4

Almost every example of MVVM I found is coded in C#, are there any examples/tutorials coded in VB.Net? I'm having a hard time translating C# to VB.Net since I haven't really used C# in any meaningful way...

Also, does a MVVM Template/Toolkit for VB.Net exist yet?

+1  A: 

Prism now has samples in VB which you can download here.

This article gives an overview - Prism allows you to develop in either WPF or Silverlight (or do linked projects which provide UIs in both WPF and Silverlight with some code) - the article mentions Silverlight but you can ignore that and still get an overview of Prism/CAG.

On the other hand, there are C# to VB translators out there - have you tried them? I made the switch from VB to C# a while back when I found that all of the sample code for the areas I was interested in were in C#. I'm glad I switched. From your PoV, it probably looks harder to read but once you're into it, it's so much easier because there's so much less excess code to clutter up the screen.

serialhobbyist
+5  A: 

You might want to look at the work of Karl Shifflett (program manager on the Cider team at Microsoft). He's one of the main forces in MVVM, and he deals pretty much exclusively in VB.NET, so you'll have plenty of samples to learn from. As an added bonus, he's written a framework called Ocean that should help you get started.

You can find more details on his blog here.

Pete OHanlon
+3  A: 

You can download the sample app made by Josh Smith in the MSDN article "WPF Apps With The Model-View-ViewModel Design Pattern" in VB.net form

In general, all code in MSDN mag gets translated to VB.net.

Eduardo Molteni
+2  A: 

I'm in the process of porting the (MVVM Light Toolkit) C# project templates and code snippets to VB.NET. I've finished the Silverlight 3 template, now working on the others.

The VB Silverlight 3 template for Visual Studio 2010 is here.
The VB WPF 3.5sp1 template for Visual Studio 2010 is here.

dotNetMark