Thank you. Your clear speech and direct manner facilitated my learning style. I can't believe it's so hard to find a "from scratch", bottom-up tutorials for MVVM / WPF like your tutorials. I really appreciate you sharing your knowledge.
Hi, I recently started with WPF / MVVM and C# and your videos show me how to deal with this stuff in a proper way! Sometimes it's a bit fast for a beginner but it's ok :) Thank you for your effort *2 thumbs up*
Nice series of videos . Could you also share projects having separate Model , View and ViewModel projects alongwith real Database interaction (SQLExpress !) with EF framework .
Very clear and helpful, please keep it up and perhaps add in a part on how to handle disconnected models (WCF or other SOA as the interface for the clients). I'm just wrapi
Hi David there is always demand for WPF videos because I personally found that on web there is very less and appropriate study materials, my only concern is that while showing demo the visibility of your visual studio is not clear I mean small font and you may skip other unwanted windows so that your visual studio will look big in size while recording a video. Thanks and great work.
I'm not sure I follow your question. I don't recall (checked the video too) using resource files in this screencast. But! I digress. Storing localizable strings in a resource file is actually recommended. Resx files are portable and you can change an executable's resources without having to recompile it, which makes it easy for teams to do localization/globalization of strings for different languages.
Hi David, I enjoyed these videos. Nice and clear. Any plans to expand on the series? I'd be interested in an items collection with an item's property editor implemented by a user control, demonstrating data binding and multiple view models (items collection has one and editor has another). I hope that's general and interesting enough to tempt you?
Hi David, Thanks for these videos - really "easy on the ear " (if such idiom exists...) I will much appreciate a some what full example with database (EF5 maybe) and even maybe a Unity along the way. I know this is an MVVM series but it will nice to get a full idea of a real life application architecture.Any way thanks again
In short, if your resource string is meant for display, I would expose it through the view-model, not the model. Or bind directly from the view, but that doesn't mean it's never okay to use resource strings in models. Resource strings have a wide-array of usages. Hope that helps.
A better approach would be to call your resource files from your view-model. Your view-model would wrap the model in this case as not to expose it to the view. When a view-model gets too big, you can break it up into smaller view-model's (remember that it's okay for a view-model to parent another view-model). The key to remember is that a view-model really represents your views state in a decoupled way, whereas the model is just data.
Nice video! What would you do when you have an application in multiple languages? Any suggestions? Because I don't think it's appropriate to use the resource file to get the string in the model class? Or am i wrong here :)
Hello, I found these videos very useful, thank you! But, there's still one thing that I'm wondering about: If I want to make a button for each property (in my case, I want an individual button for each property to randomize it), do I actually have to make a separate Command for each one, or is there some way to make the Command more dynamic so it can be used for all buttons? Or am I missing something obvious?
Thanks alot for the tutorial. It is helping me a lot. I have a question though, What is the simplest way or the proper way to disable the validation when the textbox is disabled?
Yes I know that it is recommended, my question was a bit unclear :) but is it the correct way to call the string from the resource file in the model? Because I think that the model class doesn't have to know anything about the resource file, or am I wrong? Because otherwise you can't reuse that specific model class somewhere else instead of setting that specific string in the resource file... Hopefully I'm a bit clear here with my explanation :)
Is it in the spirit of MVVM to bind to a Model property, instead of a ViewModel Property? I thought the View is only connected to the ViewModel, and only through Binding.
You can, but I advise against it and promote using a ViewModel or Façade pattern instead. It's not necessarily a wrong approach, but you get better separation of concerns not exposing the model directly and through experience you will learn that it is better not to.
Great tutorial! I have one questions. What happen if you do not set the CustomerName when the window loads and you do not want to see the error message or red border? Is it possible? Thanks!
It does not work by me :( I have no error warnings in the code but when I test the validation, the Textbox does not become red and the Message does not appear under the text box.
Thank you. Your clear speech and direct manner facilitated my learning style. I can't believe it's so hard to find a "from scratch", bottom-up tutorials for MVVM / WPF like your tutorials. I really appreciate you sharing your knowledge.
Hi,
I recently started with WPF / MVVM and C# and your videos show me how to deal with this stuff in a proper way! Sometimes it's a bit fast for a beginner but it's ok :)
Thank you for your effort
*2 thumbs up*
Nice series of videos . Could you also share projects having separate Model , View and ViewModel projects alongwith real Database interaction (SQLExpress !) with EF framework .
Great video !!!!
Simple, straight to the point, love it !
Nice video ! Hope can see more about MVVM Tutorial !!
Great serie of videos David, really appreciate it
Hi I like this session. As IDataErrorInfo is very useful.
Very clear and helpful, please keep it up and perhaps add in a part on how to handle disconnected models (WCF or other SOA as the interface for the clients). I'm just wrapi
..wrapping my head around the Repository and Unit of Work patterns and ds youruploads great.
Thanks so much! More to come as long as there is a demand for these videos. :)
Hi David I like all MVVM session.
Thanks for the great tutorials, this is great job which helped me a lot. Keep going :)
Hi David there is always demand for WPF videos because I personally found that on web there is very less and appropriate study materials, my only concern is that while showing demo the visibility of your visual studio is not clear I mean small font and you may skip other unwanted windows so that your visual studio will look big in size while recording a video.
Thanks and great work.
I'm not sure I follow your question. I don't recall (checked the video too) using resource files in this screencast. But! I digress. Storing localizable strings in a resource file is actually recommended. Resx files are portable and you can change an executable's resources without having to recompile it, which makes it easy for teams to do localization/globalization of strings for different languages.
Hi David,
I enjoyed these videos. Nice and clear.
Any plans to expand on the series?
I'd be interested in an items collection with an item's property editor implemented by a user control, demonstrating data binding and multiple view models (items collection has one and editor has another). I hope that's general and interesting enough to tempt you?
Honestly this is alot different than mvc web apps. I was so confused until i saw these videos
Of course. However, I often go without it to force myself to memorize type names in the BCL.
Hi David,
Thanks for these videos - really "easy on the ear " (if such idiom exists...)
I will much appreciate a some what full example with database (EF5 maybe) and even maybe a Unity along the way. I know this is an MVVM series but it will nice to get a full idea of a real life application architecture.Any way thanks again
In short, if your resource string is meant for display, I would expose it through the view-model, not the model. Or bind directly from the view, but that doesn't mean it's never okay to use resource strings in models. Resource strings have a wide-array of usages. Hope that helps.
Thanks for the information, I was also thinking about doing that in the viewmodel
A better approach would be to call your resource files from your view-model. Your view-model would wrap the model in this case as not to expose it to the view. When a view-model gets too big, you can break it up into smaller view-model's (remember that it's okay for a view-model to parent another view-model). The key to remember is that a view-model really represents your views state in a decoupled way, whereas the model is just data.
Nice video! What would you do when you have an application in multiple languages? Any suggestions? Because I don't think it's appropriate to use the resource file to get the string in the model class? Or am i wrong here :)
Hello, I found these videos very useful, thank you! But, there's still one thing that I'm wondering about: If I want to make a button for each property (in my case, I want an individual button for each property to randomize it), do I actually have to make a separate Command for each one, or is there some way to make the Command more dynamic so it can be used for all buttons? Or am I missing something obvious?
Thanks alot for the tutorial. It is helping me a lot. I have a question though, What is the simplest way or the proper way to disable the validation when the textbox is disabled?
Exelente los video, si no es molestia me gustaria que expliques como implementear IoC, abrazo desde Argentina.
thank you very much but where is the session 04 you us you premessed for the editing an the deleting part
thank you
krim belkacem Its up now. Sorry for the wait.
Good tutorial and great typing speed
I have a simple question for you, I noticed that you're avoiding the usage of Intellisence, WHY??
Yes I know that it is recommended, my question was a bit unclear :) but is it the correct way to call the string from the resource file in the model? Because I think that the model class doesn't have to know anything about the resource file, or am I wrong? Because otherwise you can't reuse that specific model class somewhere else instead of setting that specific string in the resource file... Hopefully I'm a bit clear here with my explanation :)
Glad. CommandParameter is pretty useful for these scenarios.
You could also bind to a collection of ICommand directly and display a button for it via a data template. ;)
Is it in the spirit of MVVM to bind to a Model property, instead of a ViewModel Property?
I thought the View is only connected to the ViewModel, and only through Binding.
You can, but I advise against it and promote using a ViewModel or Façade pattern instead. It's not necessarily a wrong approach, but you get better separation of concerns not exposing the model directly and through experience you will learn that it is better not to.
Great tutorial! I have one questions. What happen if you do not set the CustomerName when the window loads and you do not want to see the error message or red border? Is it possible? Thanks!
you can do it easily with dirty checking
Thanks for the feedback!
How about if I want the textbox blank on first run?
what's the code at the INotifyPropertyChanged members????
a question about xaml styling with validation error messages, can we use classes like with css?
Not to the same extent. You can reuse styles and have style inheritance but it's nowhere near as flexible.
Have you heard about IntelliSense and it's autocomplete feature? ;)
Man that keyboard loud as fuck! Thanks for good vid tho
Thanks alot
It does not work by me :( I have no error warnings in the code but when I test the validation, the Textbox does not become red and the Message does not appear under the text box.
Thanks!
I cant just write NotifyPropertyChanged("name"); it says I have to implement an extra Method. Is this correct? You don´t do that in your video.
Agreed!
Thanks
Where is SaveChanges() called?
can you post the codes? thank u!
why you use
string IDataErrorInfo.error{
get{return null}
}
replace implement interface
public string Error
{
//get { throw new NotImplementedException(); }
get
{
return null;
}
}
Never mind, I found the CommandParameter element..!
Thanks for the feedback!