Click here to Skip to main content
15,892,927 members
Home / Discussions / WPF
   

WPF

 
QuestionAdding ResourceDictionary to a WPF project gives "does not contain a static 'Main' method suitable for an entry point" error Pin
as_kannan11-Jun-12 23:43
as_kannan11-Jun-12 23:43 
QuestionDependency propertie validation Pin
columbos1492711-Jun-12 20:58
columbos1492711-Jun-12 20:58 
QuestionGeneral question on silverlight Pin
ebrahim rajabloo10-Jun-12 0:49
ebrahim rajabloo10-Jun-12 0:49 
AnswerRe: General question on silverlight Pin
egenis10-Jun-12 5:25
egenis10-Jun-12 5:25 
QuestionLoop multiple Videos in MediaPlayer Pin
mselvaraj9-Jun-12 1:20
mselvaraj9-Jun-12 1:20 
QuestionScreen Scraping Silverlight Web Page Pin
yirgalem8-Jun-12 12:00
yirgalem8-Jun-12 12:00 
QuestionGeneral question on MVVM Pin
jesarg7-Jun-12 6:10
jesarg7-Jun-12 6:10 
GeneralRe: General question on MVVM Pin
jesarg7-Jun-12 9:06
jesarg7-Jun-12 9:06 
I can see how keeping the business logic in the viewmodel makes sense, in which case doing normal event handling in the .xaml.cs file that calls a public method in the viewmodel would seem to suffice.

In the accepted answer in the MSDN thread I linked to, the answerer creates a static class (that the viewmodel is aware of) that specifically knows that the data is bound to a DataGrid (and not a Listview or a third-party data control). That sounds like a severe violation of the MVVM principle to me, in addition to being a pain in the butt to code and maintain.

However, I can't seem to find any examples of handling events that aren't the standard Command event (such as double-click, enter, or leave) elegantly without doing regular event handling in the xaml.cs file, which is frowned upon for some reason.

It feels like there is no real standard, and people are just juggling back and forth between competing bad practices and never really landing anywhere. I'm coding a bunch of WPF interfaces now, and I'd like me and my whole team to have a solid idea of what the best practice is.
GeneralRe: General question on MVVM Pin
jesarg7-Jun-12 12:07
jesarg7-Jun-12 12:07 
AnswerRe: General question on MVVM Pin
Abhinav S9-Jun-12 2:18
Abhinav S9-Jun-12 2:18 
AnswerRe: General question on MVVM Pin
egenis10-Jun-12 5:27
egenis10-Jun-12 5:27 
AnswerRe: General question on MVVM Pin
Cracked-Down10-Jun-12 20:17
Cracked-Down10-Jun-12 20:17 
GeneralRe: General question on MVVM Pin
Alisaunder15-Jun-12 2:56
Alisaunder15-Jun-12 2:56 
QuestionPLEASE HELP THE WAY IT CAN BE ACHIEVED Pin
formulaone877-Jun-12 0:33
formulaone877-Jun-12 0:33 
AnswerRe: PLEASE HELP THE WAY IT CAN BE ACHIEVED Pin
Mycroft Holmes7-Jun-12 13:04
professionalMycroft Holmes7-Jun-12 13:04 
GeneralRe: PLEASE HELP THE WAY IT CAN BE ACHIEVED Pin
formulaone878-Jun-12 0:53
formulaone878-Jun-12 0:53 
QuestionCopy/Pasting excel data into the WPF Rich Textbox loses formatting Pin
sundherrajan6-Jun-12 21:17
sundherrajan6-Jun-12 21:17 
AnswerRe: Copy/Pasting excel data into the WPF Rich Textbox loses formatting Pin
Mycroft Holmes7-Jun-12 0:00
professionalMycroft Holmes7-Jun-12 0:00 
QuestionRequired field Validation in WPF Pin
User-84353845-Jun-12 5:43
User-84353845-Jun-12 5:43 
AnswerRe: Required field Validation in WPF Pin
Unnikrishnan_S_N3-Jul-12 2:44
Unnikrishnan_S_N3-Jul-12 2:44 
QuestionNot able to drag and drop WPF controls on to window in Visual Studio 2008 Pin
Anurag Sinha V4-Jun-12 0:25
Anurag Sinha V4-Jun-12 0:25 
AnswerRe: Not able to drag and drop WPF controls on to window in Visual Studio 2008 Pin
Abhinav S5-Jun-12 0:47
Abhinav S5-Jun-12 0:47 
GeneralRe: Not able to drag and drop WPF controls on to window in Visual Studio 2008 Pin
Anurag Sinha V5-Jun-12 2:56
Anurag Sinha V5-Jun-12 2:56 
QuestionSilverlight client 4.0 application listboxs not working with the new Sliverlight 5.1 client Pin
Steve Holdorf3-Jun-12 12:21
Steve Holdorf3-Jun-12 12:21 
AnswerRe: Silverlight client 4.0 application listboxs not working with the new Sliverlight 5.1 client Pin
vinodkrebc7-Jun-12 0:04
vinodkrebc7-Jun-12 0:04 

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.