Click here to Skip to main content
15,885,537 members
Home / Discussions / WPF
   

WPF

 
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 
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 
Well, for someone who has started WPF stuff, MVVM, Commanding & Data Binding looks bit confusing because of the numerous articles on the Internet. You might have visit some of those articles and come to this point where you would like to know more about the MVVM. When I had started the WPF had the same issue that you currently facing.

The main advantages of the pure MVVM implementations are
1. Separation of concerns
2. Help out for Unit testing
3. Development can be carried out parallel
4. Tracing the changes/Impact and development is quite easy(this one is my favorite)

Implementing pure MVVM(not writing a single code of line communicating VM or M) is bit time consuming as you have to spend lot of time searching for the mechanism for communication e.g. double click events that you mentioned in your question above.
But believe me you will enjoy implementing it Big Grin | :-D

To implement the Pure MVVM following points should be considered
1. Do not write single line of code communicating to the VM or Model
2. Though, View can contain the code lines related to GUI only. e.g. Adjusting some controls custom width/height on window size change, can go in main windows xaml.cs file as it has nothing to do with our VM and M. Its purely related to the View
3. If any controls needs to be referenced from the code behind, reference them from the App.xaml.cs file. App.xaml.cs, you can consider this as start up configuration. e.g. customizing the Title bar (showing the Title bar like Avast Antivirus check here) can go here.
4. Start the code from the App.xaml.cs file, configure your application here, like logging initialization, start up screen display, unhanded exception etc.
5. Inject the Model and View in the View model, this is best practices as view modes knows about view as well as model (know only at interfaces level)
6. Have a BaseVM class which will implement the INotifyPropertyChanged and derive your all Vm from this. This will help in eliminating repeated code


Hope this will help you get going Big Grin | :-D


Happy Coding
Big Grin | :-D
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 
QuestionWhich platform for a simple platform game to play by web rend erer ? Pin
EternallyConfuzzled31-May-12 22:28
EternallyConfuzzled31-May-12 22:28 
AnswerRe: Which platform for a simple platform game to play by web rend erer ? Pin
Abhinav S3-Jun-12 19:33
Abhinav S3-Jun-12 19:33 
QuestionComboBox MVVM Issue Pin
wasimsharp31-May-12 21:29
wasimsharp31-May-12 21:29 
AnswerRe: ComboBox MVVM Issue Pin
Alisaunder2-Jun-12 6:24
Alisaunder2-Jun-12 6:24 

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.