Click here to Skip to main content
15,911,030 members
Home / Discussions / WPF
   

WPF

 
QuestionObsolete Examples Pin
michaelbarb28-Sep-11 8:53
michaelbarb28-Sep-11 8:53 
AnswerRe: Obsolete Examples Pin
AnnieMacD28-Sep-11 10:05
AnnieMacD28-Sep-11 10:05 
GeneralRe: Obsolete Examples Pin
michaelbarb28-Sep-11 10:21
michaelbarb28-Sep-11 10:21 
GeneralRe: Obsolete Examples Pin
SledgeHammer0128-Sep-11 10:46
SledgeHammer0128-Sep-11 10:46 
GeneralRe: Obsolete Examples Pin
michaelbarb29-Sep-11 8:13
michaelbarb29-Sep-11 8:13 
GeneralRe: Obsolete Examples Pin
SledgeHammer0129-Sep-11 8:40
SledgeHammer0129-Sep-11 8:40 
GeneralRe: Obsolete Examples Pin
michaelbarb29-Sep-11 8:50
michaelbarb29-Sep-11 8:50 
GeneralRe: Obsolete Examples Pin
SledgeHammer0129-Sep-11 10:08
SledgeHammer0129-Sep-11 10:08 
How so? What exactly are you disagreeing with? WPF is not MVVM. MVVM is not WPF. Nor is MVVM supported out of the box with no additional libraries or code. Microsoft doesn't claim to support MVVM with Visual Studio 2010. They just recommend you write WPF & Silverlight code in that style. Where is RelayCommand<T>? Where is your ServiceLocator or DI container? Where is Messenger? Those are not part of .NET at this time. Why do you think there are 10+ MVVM frameworks out there? Cinch by Sasha Barber is a popular one, MVVMLight, etc. Heck... even Microsoft itself has a library called Prism, although thats not purely an MVVM library, thats more on the MEF side of things.

You will find REALLY quickly, that if you are doing MVVM, you need a lot of support code.

For a simple example:

How do you close a dialog from the ViewModel? Normally, you just set DialogResult = true right? Too bad DialogResult is not accessible from the ViewModel Smile | :) . Oh wait, guess what? Its not a bindable property either! So you can't bind it to something in your ViewModel. Guess you need some additional (3rd party) code to do that Smile | :) . If you google that, you'll find that what everybody is doing is using attached properties in a framework.

Another example where VS2010 does not support MVVM out of the box:

How does ViewModel1 communicate with ViewModel2? They aren't supposed to know about each other. Hmm... guess you need some sort of Messenger implementation for that. Too bad .NET 4.0 doesn't have one Smile | :) .

Yet another item:

How do you forward control events to the ViewModel? Thats not supported out of the box either... Darn... guess I need some additional generic code to do that Smile | :) .
GeneralRe: Obsolete Examples Pin
michaelbarb29-Sep-11 10:48
michaelbarb29-Sep-11 10:48 
GeneralRe: Obsolete Examples Pin
SledgeHammer0129-Sep-11 12:20
SledgeHammer0129-Sep-11 12:20 
GeneralRe: Obsolete Examples Pin
michaelbarb30-Sep-11 2:22
michaelbarb30-Sep-11 2:22 
GeneralRe: Obsolete Examples Pin
Pete O'Hanlon29-Sep-11 21:58
mvePete O'Hanlon29-Sep-11 21:58 
GeneralRe: Obsolete Examples Pin
michaelbarb30-Sep-11 2:52
michaelbarb30-Sep-11 2:52 
GeneralRe: Obsolete Examples Pin
Pete O'Hanlon30-Sep-11 12:26
mvePete O'Hanlon30-Sep-11 12:26 
GeneralRe: Obsolete Examples Pin
SledgeHammer0130-Sep-11 13:35
SledgeHammer0130-Sep-11 13:35 
GeneralRe: Obsolete Examples Pin
michaelbarb3-Oct-11 3:00
michaelbarb3-Oct-11 3:00 
GeneralRe: Obsolete Examples Pin
Pete O'Hanlon3-Oct-11 3:52
mvePete O'Hanlon3-Oct-11 3:52 
GeneralRe: Obsolete Examples Pin
michaelbarb3-Oct-11 4:07
michaelbarb3-Oct-11 4:07 
GeneralRe: Obsolete Examples Pin
Pete O'Hanlon3-Oct-11 4:10
mvePete O'Hanlon3-Oct-11 4:10 
GeneralRe: Obsolete Examples Pin
SledgeHammer0130-Sep-11 13:32
SledgeHammer0130-Sep-11 13:32 
GeneralRe: Obsolete Examples Pin
michaelbarb3-Oct-11 3:36
michaelbarb3-Oct-11 3:36 
GeneralRe: Obsolete Examples Pin
Pete O'Hanlon29-Sep-11 22:25
mvePete O'Hanlon29-Sep-11 22:25 
GeneralRe: Obsolete Examples Pin
michaelbarb3-Oct-11 7:23
michaelbarb3-Oct-11 7:23 
QuestionAdam Nathan's WPF 4 Unleashed Pin
AnnieMacD27-Sep-11 11:37
AnnieMacD27-Sep-11 11:37 
AnswerRe: Adam Nathan's WPF 4 Unleashed Pin
Pete O'Hanlon27-Sep-11 12:08
mvePete O'Hanlon27-Sep-11 12:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.