One of the hardest things to overcome, as a developer, is yourself. I've been avoiding this topic for far too long and FINALLY understand it. Thanks again, Tim.
This guy is still answering questions posed to a video in 2017... How is that for dedication... Thanks Tim, I am currently applying all that I am picking up here! KUTGW!
I have taken at least a dozen online courses in the last three years. Some of them were Udemy Courses, Professional Development courses through my job, and some were tutorials from other RUclips channels. You're videos, channel, and teaching style, in my opinion, are superior to most other free and paid tutorials I have taken. Thank you so much for sharing your knowledge.
In the part of the video where you activate the child user controls the method "ActivateItem()" was replaced by "ActivateItemAsync()" Thank you so much, Mr. Corey, for creating these outstanding instructive videos! Keep up the great work, can't wait to learn more from your future videos!
Lately, I don't even listen to the radio in my car anymore, I just listen to Tim's tutorials. His explanations are great and he often includes a lot of little "gotcha's" that other instructors forget or don't care to talk about. Thanks Tim!
This is so powerful, especially considering that for buttons, as long as your naming conventions are correct, there's all the wiring that isn't needed. I never realized that this was possible with the Caliburn.Micro package. Thanks for walking through it so completely, Tim!
ActivateItem (at 1:17) is replaced by ActivateItemAsync public async Task LoadPageOneAsync() { await ActivateItemAsync(new FirstChildViewModel()); } You can, but don't have to replace
Super helpful Ivo - thank you! I also took a quick excursion with Tim's Sync and Await video, which helped give context to what you provided: ruclips.net/video/2moh18sh5p4/видео.html
I appreciate the fact that you don't talk at a million miles and hour and pause frequently. This puts you miles above a lot of the coding education channels on this platform. This makes it so much easier to follow and I don't have to pause the video all the time to read and absorb what your doing.
Great video, learnt a lot. BUT I wish we did not use caliburn, because it is doing some little things behind the scene and we are unaware of them. If we learnt hard core WPF(MVVM) without caliburn we would be much more confident. Or video could have been in two ways with and without claiburn. Just saying... Anyways a great video. Looking forward to more videos for in depth usercontrols, more binding concepts between different kind of UIs. Can do a video on ICommands for buttons
I considered doing a video on home-grown MVVM but decided against it for a couple reasons. First, that is much more complicated to do, thus increasing the barrier to entry (and greatly increasing the time of the video). Second, it is essentially reinventing the wheel. Some really smart people spent a LOT of time making MVVM simple and easy to use. There has to be a balance between learning the foundation and taking steps forward. I think in this case, moving forward is more important than learning how the MVVM tool was built. In the same way, I don't dive into how WinForms are built really. I mention it but we don't bypass the drag and drop designer to manually code every button. It isn't necessary because someone has made our life easier. Thanks for the suggestions on other videos. I'll make sure those are on the list of possible video ideas.
Thank you so much for this. Some people may say that you break things down too much but sometimes when you are learning a completely new language etc. (I have only ever used python) it is sometimes very helpful to have these things over-explained so you don't have to spend an hour googling to wrap your head around things. These videos are incredibly useful and are often better than paid tutorials on reputable websites!
1000% agree! As someone who knows nothing more advanced than console programming learned at school, I find myself getting overwhelmed by the tutorials I find on RUclips because some of them just feel like reminders for experienced programmers rather than for beginners to understand. But this particular tutorial is great for beginners for the reason you mentioned.
As a WPF MVVM noob, this video adds to my confusion regarding WPF and MVVM. Why are you using a third party tool for MVVM? Can't WPF do MVVM out of the box? Isn't MVVM just a way to structure the files? Why do you need to install a third party tool for that? Is this tool free to use? Is it shareware? How do the developers of this third party tool get paid? What happens when the developers get bored and stop updating the tool and Microsoft makes an update which causes Caliburn to fail? Now you're screwed. Now you need to redo all the code to make it work with another framework. I'm skeptical of using a third party tool for these reasons. If you must use a framework, why not use PRISM as it's made by Microsoft and should therefore be the "official" MVVM framework? It seems safer to use than some random third party tool made by some guys in a basement. I don't understand why you're so excited over Caliburn. Are you promoting them? You say you "loooove the buttons in Caliburn Micro" but give no evidence to back up your enthusiasm. As a first video on WPF MVVM you go straight to Caliburn without first doing it "clean" out of the box, so the viewers have no idea how Caliburn makes the code different from the original. Is there less code to write? Is the code different and how? You should definitely do a video explaining how to do MVVM without any framework to demonstrate how Caliburn makes the code different and give concrete examples on how it supposedly makes life easier.
I definitely understand where you are coming from. However, there isn't a "clean" way of doing MVVM. Yes, you can build your own MVVM system but in the end, you will have built Caliburn Micro (or Prism, etc. - basically you would have done what has already been done). I use Caliburn Micro right away because it makes learning MVVM much, much easier. Think of it as learning to drive a car vs. building a car to then learn to drive. As for what happens if the Caliburn Micro team goes away, that is why I chose Caliburn Micro. They have over a decade of work into Caliburn Micro. They have a good system of governance and development and have proven to be reliable. The CM code is also open source, meaning if they decided to go away tomorrow, you could still use CM and you could continue to develop it on your own. Again, it would be like driving a car that one day you might need to maintain. You save all of the initial work, even if you need to continue it later. As far as Prism goes, it is basically the same as CM. It is not a Microsoft product. It came out of the Microsoft Patterns & Practices but it is an open-source project that is maintained by an independent community of developers. It is no more stable than CM in that regard. When you build software in .NET, you have two choices: do everything yourself or use third-party frameworks and packages. If you do it all yourself, you are going to spend a LOT of time building and maintaining systems that others have already done. Yes, you get to say that you built it and you don't really care if you go away but that actually makes your code more fragile than if you used third-party open-source systems. With you there is only one developer to maintain the system (or your team if you have one). With third-party, open-source projects, there are typically multiple individuals working on the code. On the other hand, if a project goes away, you have to pick up the maintenance on that project or swap it out. But if that is too much of a burden, did you really have time to build the system in the first place? I personally choose to carefully select the packages and frameworks I use. I don't just pick things blindly. I use Dapper because it is quick, powerful, and supported by the team that runs Stack Overflow. I use Caliburn Micro (CM) because I have a long history of using it. It has been around since before Silverlight. It has outlasted multiple Windows products including Windows Phone Silverlight, and more. I use Autofac for dependency injection because the have a simple way of doing things. I use XUnit for unit testing because I like how they structure things. Those are the major ones. I spent a lot of time testing before making these choices. I hope that clears things up. Basically, using CM makes MVVM easier to learn. Yes, it is a tricky subject but by doing things this way, you are building on the shoulders of giants (which is what the .NET Framework/Core is all about).
Thank you for explaining how Caliburn works with this nice example. The following is just a rant against Caliburn, not your great presentation, so please don't take it personally. At least regarding understanding MVVM: I think that a framework makes things a lot more difficult to understand since you not only have to understand WPF and the concept of MVVM, but also how the framework actually works. From my point of view: if you're a beginner then you have to implement an extremely simple app (click counter with a dialog confirmation is my go to app) without any framework. Implement that several times and then you can proceed to using whatever framework you like. You have to agree with me here that Caliburn does tons of black magic based on very specific visual component names. It basically goes against the normal flow: you don't have bindings, commands and behaviors which are MVVM's building blocks. You learn Caliburn, not MVVM. If you were to get hired in another company that does WPF and MVVM, but without Caliburn - you'd be totally screwed. Everything you know about Caliburn will be useless without the basics. IMHO, Caliburn is actually detrimental to a beginner. Actually, I consider that it's also detrimental to any project - too many things have to match up to actually get it to work, it's damn fragile and the knowledge you gain is worthless for another project without Caliburn. Again, don't take it personally. This is about Caliburn, not you. I enjoyed your presentation and demo. Keep up the great work!
@@IAmTimCorey Thanks a lot Tim, your comment helped me even more than the video. Maybe you can make a video specificly about Caliburn Micro some day. Cheers!
This helped me out IMMENSELY! I recently asked how to learn the MVVM design pattern on Reddit, which directed me to Caliburn.Micro, which directed me here. I feel like I understand now! Funny story though... Part way through your video I accidentally hit the hotkey to slow the video down to 0.75x speed and thought to myself "Man, why did he decide to start sounding all condescending"? Caught it, turned it back up and laughed! Great video!
Thanks for a great tutorial! I can definitely see some of the benefits of Caliburn.Micro, but I'm struggling to wrap my head around exactly how I should be using it because I don't even know what problems it's solving for me. It also feels like the official documentation explains what to do, but not so much why I'm doing it. Would it be worthwhile to learn MVVM without a framework - or with a lighter framework - first, and then move on to CM once I have a better grasp of MVVM, or am I better off working with CM until I understand it?
This is absolutely brilliant. I was taught MVVM from scratch and I sometimes found setting up the 'plumbing code' to get it working a bit of a headache. I am always a little dubious of using magic words but I think it will be OK once using Caliburn Micro becomes second nature. Using this a new WPF project can be setup for MVVM in minutes.
You read my mind! I too wondered how much code might have been required for a given scenario. I suspect this would make the argument for using a polished framework. Also I wonder if C# and WPF may have evolved over the years to require fewer add-ons. PS. @IAmTimCory, I'm really enjoying the content and will consider taking some of your courses in future. Cheers!
Yes, that would indeed be very helpful. There are many comments in the video about keeping your code human readable yet it seems Caliburn Micro obfuscates many of the connections between view and viewmodel making it difficult to follow what's happening without knowing all it's documentation by heart. Surely that too would be forgotten 6 months down the road especially if it is no longer maintained as other comments suggest and would probably be true for any other 3rd party framework for doing MVVM. Perhaps .NET just hasn't matured in regards to MVVM since there are so many tools around to make it easier...
It's now 1:01 AM in Australia, and I just watched up to 1:03:41. I really like and appreciate your effort to write clear if condition and dodge the negation in the boolean expression. And I agree! Somehow, dealing with negation can be tricky - it tripped me over so so many times in the past, and yet, it is used by many devs carelessly. Keep up the good work!! Love how you not only explore the framework but also promote clean code.
Great video and explanation as always. Do you have any plans to do a plain vanilla intro to MVVM /WPF? Your teaching style is the best and I know I would get a lot out of such a video. Others would like it also from the comments I am seeing.
Great resource! You say at about 19:32 that "the entire thing is the user interface". Does that mean the business logic happens outside the three M, VM, and V folders we create?
This is really helping me with a greenfield project that I'm handling all by myself which was extremely overwhelming, this is literally putting food on my table. Thank you.
Great explanation, but there's one thing I couldn't figure out how the CanClearText function works? What makes it work exactly? I understand the idea that the ClearText function is enabled but don't understand how CanClearText is enabled? And I probably missed the explanation regarding the matter that the ClearText function should receive parameters, I didn't understand why this should be done
I am with you, great tutorial but there is no explanation of how the CanClearText and ClearText communicate with each other. This part of the tutorial completely lost me :(
@@MikePL101I've just been watching the video, but am yet to try the code and I too was originally confused by how that function managed to get wired up to the button so I rewound the video back to where Tim starts talking about this function and it sounds like all you have to do is create a function that returns a Boolean, and the name of the function has to match the original button function name, but just needs the word Can appended to the beginning. That's why it's called CanClearText. It wouldn't work if was called by any other name. It must be a naming convention that is required and then it simply works. Of course, when I say function, I mean method. Old habits are hard to change. Been coding for over 40 years.
OMG Thanks a lot, i do in 1 hour something a i take 2 days just setting up the project, i feel i was trying run before even learn to walk. cal and you save my life.
awesome everything ok until 1:17:31 I got an error the method ActivateItem() does not exist in the current context. I tried to continue ignoring the error but it keeps there.I'm inheriting from Conductor. There's a method called *ActivateItemAsync()* i tried it but it doesn't work. Help please
ActivateItem (at 1:17) is replaced by ActivateItemAsync public async Task LoadPageOneAsync() { await ActivateItemAsync(new FirstChildViewModel()); } You can, but don't have to replace
Yep, there is a lot of good stuff in those design patterns. The key is to not go too crazy with design patterns so that you make a simple application overly complicated. As always, balance is key.
Wow, this seems Brutal for making GUIs. All that XAML typing and work just to add a combo box and some test. Holy cra* man. No thanks!! I'll stick with VB6 and WinForms. 0.o Can't I just drag and drop a combobox width and a text label??? Good grief man. This was a great video to show me why I never want to use WPF! Hahahaha.
Tim, so much thanks. This video is 100 % accurate for the purpose. The speed and the organization of content is just exact. I learnt a lot. I was able to build what I wanted to build by following every second of this video. Each second of the video was only helpful. I am going to refer all your other videos for my requirement of learning and building.
@IAmTimCorey It's a little unfair to be getting this kind of criticism on a very informative video you went through the effort to make several years ago. I appreciate your optimism and maturity in regards to unnnecessarily callous comments however I think people like *squints at name* @スリンキ--Slinky need to put the keyboard down and watch your video titled "Caliburn Micro Is No Longer Being Maintained. Now What?" before chiming in. I for one will be scouring your video list for other MVVM framework examples to determine whether or not my next cross platform IoT project, that utilizes C# in the Windows portion of the software, will be using something other than Caliburn Micro. I don't mind the difficulties that came with wrapping my head around this framework, but I do recognize its shortcomings. Either way please know that your work here in this video is deeply appreciated and will be useful long after .NET becomes incompatible with this sunsetted framework.
Very great tutorial and instruction. Similar in style to a fantastic instructor I had a few years ago, you'd probably do well in classroom instruction. Only thing I was a little disappointed there was no touching on dealing with multiple windows in Caliburn, but you gave enough of a foundation that I can reasonably understand the results of my searches now. Even feeling reasonably proficient with C#, without much familiarity with XAML and zero with Caliburn search results / stack overflow read like Greek!
I work with multiple windows in Caliburn Micro/WPF in the TimCo Retail Manager series here on RUclips: ruclips.net/p/PLLWMQd6PeGY0bEMxObA6dtYXuJOGfxSPx
All of them will work well. I recommend Caliburn Micro because I like how it is set up and the opinions it has. I don't do anything in my videos that I don't recommend for production unless I very clearly state that.
I was getting so frustrated because the program didn't want to do what it was supposed to do. I changed the Caliburn.Micro from the newest version to 3.1and it worked. Programmers struggle I guess. :D Thank you for all that you do.
So, Caliburn Micro saves you few characters on every binding, but takes away all the refactoring features of strongly typed language of C# + XAML. Not nice :) when you setup DataContext in XAML, you get full InteliSense on ViewModel properties in bindings.
@@IAmTimCorey I am sure it did much more, but binding by name convention seems odd. If i rename a view model property, i have use text search to change all bindings. I know from experience that I often use the same names in different view models (like IsBusy), so I would have manually check whether given IsBusy is from correct view model. I am aware that with Calibur Micro I could just use unique names, but we all know how that ends , especially in a team. Great video though, I watched it all which is weird since I don't like the technology. Thanks :)
Can't thank you enough for this video. I always had issues with tying some of the concepts of MVVM into practice, but after watching this and implementing the demo myself, I feel i have a much better understanding. Time to get working on refactoring a ton of old code.
Am i the only one that hates frameworks that do all that sort of automagical stuff just by having things named certain ways? I kinda like manually connecting the parts and eg telling which viewmodel connects to which view, rather than letting some framework try to figure it out...
Nope, you aren't the only one. I'm normally not a proponent of them but I make an exception in this case because of the adoption of it, how easy it makes MVVM, how much it provides that I would otherwise have to do myself, and the long-term support it has been given. But I totally get doing it yourself so there is no magic.
I hate also this kind of framework. I will not use it in my WPF project. Learning WPF is enought work (it worth it), therefore I dont want to learn a framework to be used for another framework (WPF).
Finally a Video worth watching! Literally watched it from the beginning till the End. Really appreciated thanks alot. Unlike other Many videos well explained.
As an Android developer who also likes MVVM this looks really clean. Looks a lot nicer than the implementation we use over in Android land, very structured.
Thanks Tim, you are literally doing miracles with your tutorials keep it up. I would like to see you do a start to finish payroll tutorials, analysis especially, thanks.
Went through your Fundaments intro into wpf and it wet my whistle enough to learn more before moving on. Looking forward to the new things I can do with it.
Excellent video on the MVVM topic! I would love to see another fantastic video where Tim designs his own MVVM framework without using any third-party libraries.
Love the video. Makes learning a lot more simple and enjoyable - please keep up the fantastic work! :-) Found something about Caliburn Micro connections/associations that I think is worth noting. 1:04:53 "Since we pass into the ClearText(), we can also pass into the CanClearText()" However, it looks like we don't need to pass firstName and lastName into CanClearText(), using the corresponding public properties instead: public bool CanClearText() { if(String.IsNullOrWhiteSpace(FirstName) && String.IsNullOrWhiteSpace(LastName)) { return false; } else { return true; } } works just fine. The ClearText(), for it's purpose, does not need those parameters passed in - BUT IF WE DON'T pass those parameters into ClearText(), CanClearText() just does not get invoked (and naturally, the button auto-disable/enable doesn't work). So, it looks like passing the seemingly unnecessary parameters to ClearText(string firstName, string lastName) actually establishes the "magic" link between changes in FirstName/LastName and CanClearText(). Pretty counter-intuitive if you ask me :-)
Great work Tim,you made it very easy to understand, the active item thing made my life much more easier. i as a beginner was creating new instance of a user control everytime i want a new page and having a goback button in the new page now.
Please help me, I opened a new view in Content Control and added a button there to change this view to another one, for example to page 2, but in ViewModel I can not call Activator again. Because there is a Screen inherited there and not a Conductor, Tell me how to switch to another a page from FirstViev in SecondViev
I really liked this video. This actually encouraged me to create my own version of caliburn micro which has some features that caliburn micro does not have.
Followed through this, and found it extremely interesting. Thank you! It would seem the pitfall here is the way that everything hangs together based on 'names "hooking up" ' and the mechanism thereby "works" . . . but that the application still builds fine if there's a typo in the naming that breaks the mechanism(s). This seems a slight retrograde step from WinForms, where a typo usually results in an immediate "yell." (For example: one could envisage mayhem if some text replacement operation to the source-code was botched: everything still builds OK, but the some of the functionality driven by the naming stops working). Perhaps in later installments you might be addressing those sort of concerns, but this comment is obviously coming from a very ingenue perspective. WPF certainly opens up some interesting UI ideas. Thanks again.
Thank you so much Tim. I'm going plan to switch my company framework from MFC to WPF (My company still hold an very old framework). This is very good reference and start for me. Thanks
Thanks, I wanted to check out MVVM and this was a great place to start. I worked through it with the older CM 3.x versions and then upgrade to 4.x which wasn't too difficult beyond changing to use the async methods.
Great video. An addendum to this. You can use the normal binding for anything. Thus you could use if you want. This is useful if you want to change the Mode or the UpdateSourceTrigger so the button updates on every keypress. HOWEVER - if you do this and want to use the property in a guard function (CanXXX), you STILL need to name at least one object for this property in the page/control using the Caliburn Micro conventions. If you use a CanXXX property and handle the NotifyPropertyChanged yourself, it isn't an issue. That is why I usually use the property version of the guard and keep track of the notify's myself. The advantage is that if a button isn't disabling, I usually will look in my ViewModel first. If I am there, I don't need to open a second file. I just thought this might save someone a little time.
Thank you, it was a bit slow because of some parts with no relation to MVVM or Caliburn Micro (like the rows and column definitions etc) but it still helped me to learn how to start with MVVM.
Great work Tim. You are one of the best. I suggest that you make a full detailed course about Caliburn Micro. Such course will be a hit, and I definitely will buy it. Keep on the good work.
Hello sir thank you , you don't know how lucky I am to find your channel and find great teacher such as you , I live in third world country and having access to your videos really changed my life , you are one of if not the only reason I love C# . your way of teaching it really blows my mind .the fact that you keep going back to your 4 yo videos and answering questions shows that you are guy with great character . I've been helping my friends and teaching them C# , and every time they ask from where I learned all that i point them to you, i learned lot of stuff from you not only programming but also the way you slow talk when teaching again thank you . And i have question , do you think Caliburn Micro is good choice in 2021
It depends. If you don't mind staying with .NET 5 and below then yes, I think it is a great option. Otherwise, you need to think about other options like MvvmCross or Prism.
I would push back on the obsolete comment. This code is still valid and fully supported by Microsoft to this day (and beyond). Also, businesses don't work only on the latest version of .NET. There are a LOT of developers out there working on older versions of .NET and the .NET Framework.
Great vid! Caliburn Micro seems very powerful, it automates a lot of things. But I would have preferred a more classic approach to MVVM (without Caliburn). Since Caliburn does a lot of things behind our backs, it also has the disadvantage of preventing us from really pinpointing aspects of the MVVM, which is just my opinion, but Caliburn should be used AFTER mastering the "classic" MVVM.
Nice Tutorial, I just want to learn some frontend technology, I have unity3d background, I want to learn some other front-end tech, want to choose WPF, electron, or browser app using js, ts or react. But finally I see your video and decide to learn WPF, thanks for your great effort.
Hi Tim, I love your explanation and patience. I'm a .NET / WPF Rockie Dev but I hope to get used to it soon. Just for the record, try not to do large videos because it's kinda difficult to follow the subjects. 20/25 min per videos will be fine. Thanks a lot.
The problem with setting a timer on a video is that I then have to cut out things that are important but don't fit into the timeframe. I can't be patient and explain things and also meet a set deadline. I try to avoid overly long videos but at the end of the day, time isn't my biggest concern.
A great scratching of the surface ... makes me want to look deeper on down. There are things other than combo - text - labels and buttons that I really need to look into. Course add on purchased!
Hi Tim, like everyone else I am so so very grateful for all your hard work on producing your videos. You are now my go-to resource and I don't know what I'd do without you. Quick question, I've seen your more recent video about moving to MVVMCross, as it had been announced that CaliburnMicro wasn't to be supported anymore. I'm about to start a new WPF project, I see that Caliburn seems to have been updated relatively recently (version 4 and subsequent fixes I'm guessing). Is it still a sensible choice?
Tim, thank you so much for this amazing video. I'm finally starting to understand MVVM and I'd be very grateful if you could talk a little more about Caliburn.micro. 😁
I'm glad you enjoyed it. I'll be using Caliburn Micro in the future for other WPF videos but in the meantime, I did create an add-on course for my C# Application from Start to Finish course that is 7 hours of Caliburn Micro content, in case you are able to purchase it. If not, no worries, more content is coming in the next few months.
Dear Tim, Thank you for this phenomenal tutorial. It is a pure gold, i have to say! I have one dummy question: private BindableCollection _people = new BindableCollection(); public BindableCollection People { get { return _people; } set { _people = value; } } Why in the constructor we are using People.Add(new PersonModel { FirstName = "Tim", LastName = "Corey" }); instead of _people.Add(new PersonModel { FirstName = "Tim", LastName = "Corey" }); What is the difference? Thank you in advance and keep up the good work! Vasko
We use the public version of the property instead of the private backing field in order to keep any logic in place. Basically, we avoid ever touching the private backing field outside of in the property itself. That way, if we protect what can be set or what the user can see, those protections are not bypassed.
I think there needs to be a pinned comment about how to get this working with VS2019 and exactly which .Net Framework is supported. The only way I was able to get the App.xaml to configure without errors on VS2019 was to use the latest alpha version of the Caliburn.Micro package and version 4.6.1 of the .Net framework. Anyway, keep up the good work.
I would recommend following along using the .NET Framework instead of .NET Core since there are other things that will trip you up as well. I do cover moving your WPF project with Caliburn Micro from .NET Framework to .NET Core in the TimCo Retail Manager series here on RUclips. We cover using the alpha build and changing a lot of the calls to async.
Thanks Tim, again very good video and explanation. It would be great if you do a second part. For example explain where I put functions and do my logic stuff. Cause I have some trouble to understand where to fill the BinddableCollection when I don't want to do that in the View Model.
Hi Tim, What is your opinion/solution to the following problem: At work im mainly creating WPF desktop applications and many guides and frameworks tell me to create two folders /ViewModels/... and /Views/... but when my application gets bigger there is always the point where my two folders get really big and there is almost no connection between the views in the view folder and the viewmodels in the viewmodels folder (except for some base classes of cource). So my thought on this was/is that a viewmodel and its corresponding view should be placed side by side in one single folder (e.g. MVVM/AddUser/AddUserViewModel.cs and MVVM/AddUser/AddUserView.xaml) . If I change one of them the other one often has to change to therefore placing them in the same folder combines them logically.
Is it best practice to add a ViewModel for the User Control? There is a lot of people who argue that a User Control should NOT have it's own ViewModel. This makes sense for simple applications. But for large applilations I find it benefisuial to add a ViewModel to make "Parent" ViewModel a bit simpler. What is your recomendations?
I like the Button functionality that you've explained in Caliburn.Micro. One potential problem is if you are working in a team, and you've deployed a project which incorporates these features, but other members of the team don't use Caliburn.Micro. Then, one day, another member of the team has to dig into your project for some maintenance reason. He or She comes across these "useless" parameters being passed in to ClearText and CanClearText and thinks.... WTF is this? Alternatively, if you simply bind the Enabled property of the button to an associated boolean property in the ViewModel, it's more long-winded to type out for you but the intentions are clear for someone else who comes upon your code later on. On balance I am swaying towards the make it clear for someone else option.
In principle I agree, although in this case I'm not sure I would go this direction. If you are in an environment where others might work on your code, they should either know how Caliburn Micro works (in general at least) or I would recommend against using Caliburn Micro at all. If that was the one sticking point then I would do what you are recommending but if that is an issue, probably some of the other bindings will be an issue as well, in which case using CM probably isn't worth it.
One of the hardest things to overcome, as a developer, is yourself. I've been avoiding this topic for far too long and FINALLY understand it. Thanks again, Tim.
Awesome! I'm glad this video helped clear things up for you.
This guy is still answering questions posed to a video in 2017... How is that for dedication... Thanks Tim, I am currently applying all that I am picking up here! KUTGW!
Fantastic! I am glad it is so helpful to you.
I have taken at least a dozen online courses in the last three years. Some of them were Udemy Courses, Professional Development courses through my job, and some were tutorials from other RUclips channels. You're videos, channel, and teaching style, in my opinion, are superior to most other free and paid tutorials I have taken. Thank you so much for sharing your knowledge.
I am glad my content has been helpful.
In the part of the video where you activate the child user controls the method "ActivateItem()" was replaced by "ActivateItemAsync()"
Thank you so much, Mr. Corey, for creating these outstanding instructive videos! Keep up the great work, can't wait to learn more from your future videos!
Thanks for the encouragement
Best teacher on the net by far. I can't understand why anyone would give a thumbs down.
Thank you!
Lately, I don't even listen to the radio in my car anymore, I just listen to Tim's tutorials. His explanations are great and he often includes a lot of little "gotcha's" that other instructors forget or don't care to talk about. Thanks Tim!
You are welcome. I'm glad I make your ride more enjoyable.
Amazing! Tim you really helped me understand MVVM and Data Binding. I was lost before this video.
I'm glad it helped.
0:00 - Intro
1:16 - Setting up .NET console app
2:31 - Caliburn Micro NuGetd
3:57 - App configuration
10:29 - Creating MVVM structure
13:36 - Creating a view model
15:19 - Creating a view
15:40 - Launching MVVM app
17:41 - Caliburn Micro explained
21:19 - View setup
25:54 - Displaying data
31:04 - Binding data
33:00 - Notify Of Property Change
40:54 - Adding demo data
47:02 - Adding and wiring up a Combobox
51:55 - Binding to object property
54:19 - Buttons: adding and wiring up
57:01 - Buttons: disable a button
1:06:14 - Multiple forms
1:21:07 - Summary and concluding remarks
You are rocking it this weekend!
This is so powerful, especially considering that for buttons, as long as your naming conventions are correct, there's all the wiring that isn't needed. I never realized that this was possible with the Caliburn.Micro package. Thanks for walking through it so completely, Tim!
You are most welcome. Thanks for watching.
ActivateItem (at 1:17) is replaced by ActivateItemAsync
public async Task LoadPageOneAsync()
{
await ActivateItemAsync(new FirstChildViewModel());
}
You can, but don't have to replace
Thanks for those informations :)
Thanks so much!
Thanks!
Still not working 😐
upd: BRUH i didn't saw that ContentControl was named ActiveItem but not ActivateItem
Super helpful Ivo - thank you!
I also took a quick excursion with Tim's Sync and Await video, which helped give context to what you provided: ruclips.net/video/2moh18sh5p4/видео.html
I appreciate the fact that you don't talk at a million miles and hour and pause frequently. This puts you miles above a lot of the coding education channels on this platform. This makes it so much easier to follow and I don't have to pause the video all the time to read and absorb what your doing.
I am glad they are helpful.
Great video, learnt a lot. BUT I wish we did not use caliburn, because it is doing some little things behind the scene and we are unaware of them. If we learnt hard core WPF(MVVM) without caliburn we would be much more confident. Or video could have been in two ways with and without claiburn. Just saying... Anyways a great video.
Looking forward to more videos for in depth usercontrols, more binding concepts between different kind of UIs.
Can do a video on ICommands for buttons
I considered doing a video on home-grown MVVM but decided against it for a couple reasons. First, that is much more complicated to do, thus increasing the barrier to entry (and greatly increasing the time of the video). Second, it is essentially reinventing the wheel. Some really smart people spent a LOT of time making MVVM simple and easy to use. There has to be a balance between learning the foundation and taking steps forward. I think in this case, moving forward is more important than learning how the MVVM tool was built. In the same way, I don't dive into how WinForms are built really. I mention it but we don't bypass the drag and drop designer to manually code every button. It isn't necessary because someone has made our life easier.
Thanks for the suggestions on other videos. I'll make sure those are on the list of possible video ideas.
Thank you so much for this. Some people may say that you break things down too much but sometimes when you are learning a completely new language etc. (I have only ever used python) it is sometimes very helpful to have these things over-explained so you don't have to spend an hour googling to wrap your head around things.
These videos are incredibly useful and are often better than paid tutorials on reputable websites!
Thank you!
1000% agree! As someone who knows nothing more advanced than console programming learned at school, I find myself getting overwhelmed by the tutorials I find on RUclips because some of them just feel like reminders for experienced programmers rather than for beginners to understand. But this particular tutorial is great for beginners for the reason you mentioned.
You are a flower in a forest of thick Indian accents
Thanks :-)
Even if I agree with you but still this is very ugly to say stop racism 😢
@@dev_sda but so true do. also, this video useless now that the CommunityToolkit is 8.0
@@dev_sda it’s not racist to point out that you can’t understand a foreigner.
Languages aren’t races.
@@dev_sdaplease
i just LOVE the way you are trying to keep it as simple as possible
I’m glad.
As a WPF MVVM noob, this video adds to my confusion regarding WPF and MVVM. Why are you using a third party tool for MVVM? Can't WPF do MVVM out of the box? Isn't MVVM just a way to structure the files? Why do you need to install a third party tool for that? Is this tool free to use? Is it shareware? How do the developers of this third party tool get paid? What happens when the developers get bored and stop updating the tool and Microsoft makes an update which causes Caliburn to fail? Now you're screwed. Now you need to redo all the code to make it work with another framework. I'm skeptical of using a third party tool for these reasons. If you must use a framework, why not use PRISM as it's made by Microsoft and should therefore be the "official" MVVM framework? It seems safer to use than some random third party tool made by some guys in a basement. I don't understand why you're so excited over Caliburn. Are you promoting them? You say you "loooove the buttons in Caliburn Micro" but give no evidence to back up your enthusiasm. As a first video on WPF MVVM you go straight to Caliburn without first doing it "clean" out of the box, so the viewers have no idea how Caliburn makes the code different from the original. Is there less code to write? Is the code different and how? You should definitely do a video explaining how to do MVVM without any framework to demonstrate how Caliburn makes the code different and give concrete examples on how it supposedly makes life easier.
I definitely understand where you are coming from. However, there isn't a "clean" way of doing MVVM. Yes, you can build your own MVVM system but in the end, you will have built Caliburn Micro (or Prism, etc. - basically you would have done what has already been done). I use Caliburn Micro right away because it makes learning MVVM much, much easier. Think of it as learning to drive a car vs. building a car to then learn to drive. As for what happens if the Caliburn Micro team goes away, that is why I chose Caliburn Micro. They have over a decade of work into Caliburn Micro. They have a good system of governance and development and have proven to be reliable. The CM code is also open source, meaning if they decided to go away tomorrow, you could still use CM and you could continue to develop it on your own. Again, it would be like driving a car that one day you might need to maintain. You save all of the initial work, even if you need to continue it later.
As far as Prism goes, it is basically the same as CM. It is not a Microsoft product. It came out of the Microsoft Patterns & Practices but it is an open-source project that is maintained by an independent community of developers. It is no more stable than CM in that regard.
When you build software in .NET, you have two choices: do everything yourself or use third-party frameworks and packages. If you do it all yourself, you are going to spend a LOT of time building and maintaining systems that others have already done. Yes, you get to say that you built it and you don't really care if you go away but that actually makes your code more fragile than if you used third-party open-source systems. With you there is only one developer to maintain the system (or your team if you have one). With third-party, open-source projects, there are typically multiple individuals working on the code. On the other hand, if a project goes away, you have to pick up the maintenance on that project or swap it out. But if that is too much of a burden, did you really have time to build the system in the first place?
I personally choose to carefully select the packages and frameworks I use. I don't just pick things blindly. I use Dapper because it is quick, powerful, and supported by the team that runs Stack Overflow. I use Caliburn Micro (CM) because I have a long history of using it. It has been around since before Silverlight. It has outlasted multiple Windows products including Windows Phone Silverlight, and more. I use Autofac for dependency injection because the have a simple way of doing things. I use XUnit for unit testing because I like how they structure things. Those are the major ones. I spent a lot of time testing before making these choices.
I hope that clears things up. Basically, using CM makes MVVM easier to learn. Yes, it is a tricky subject but by doing things this way, you are building on the shoulders of giants (which is what the .NET Framework/Core is all about).
Thank you for explaining how Caliburn works with this nice example. The following is just a rant against Caliburn, not your great presentation, so please don't take it personally.
At least regarding understanding MVVM: I think that a framework makes things a lot more difficult to understand since you not only have to understand WPF and the concept of MVVM, but also how the framework actually works.
From my point of view: if you're a beginner then you have to implement an extremely simple app (click counter with a dialog confirmation is my go to app) without any framework. Implement that several times and then you can proceed to using whatever framework you like.
You have to agree with me here that Caliburn does tons of black magic based on very specific visual component names. It basically goes against the normal flow: you don't have bindings, commands and behaviors which are MVVM's building blocks. You learn Caliburn, not MVVM. If you were to get hired in another company that does WPF and MVVM, but without Caliburn - you'd be totally screwed. Everything you know about Caliburn will be useless without the basics.
IMHO, Caliburn is actually detrimental to a beginner. Actually, I consider that it's also detrimental to any project - too many things have to match up to actually get it to work, it's damn fragile and the knowledge you gain is worthless for another project without Caliburn.
Again, don't take it personally. This is about Caliburn, not you. I enjoyed your presentation and demo. Keep up the great work!
@@IAmTimCorey Thanks a lot Tim, your comment helped me even more than the video. Maybe you can make a video specificly about Caliburn Micro some day.
Cheers!
Studying .Net in collage right now and your videos are appreciated by me and my classmates.
Awesome!
This helped me out IMMENSELY! I recently asked how to learn the MVVM design pattern on Reddit, which directed me to Caliburn.Micro, which directed me here. I feel like I understand now!
Funny story though... Part way through your video I accidentally hit the hotkey to slow the video down to 0.75x speed and thought to myself "Man, why did he decide to start sounding all condescending"? Caught it, turned it back up and laughed!
Great video!
Ha! I'm glad you enjoyed the video.
Thanks for a great tutorial!
I can definitely see some of the benefits of Caliburn.Micro, but I'm struggling to wrap my head around exactly how I should be using it because I don't even know what problems it's solving for me. It also feels like the official documentation explains what to do, but not so much why I'm doing it.
Would it be worthwhile to learn MVVM without a framework - or with a lighter framework - first, and then move on to CM once I have a better grasp of MVVM, or am I better off working with CM until I understand it?
This is absolutely brilliant. I was taught MVVM from scratch and I sometimes found setting up the 'plumbing code' to get it working a bit of a headache. I am always a little dubious of using magic words but I think it will be OK once using Caliburn Micro becomes second nature. Using this a new WPF project can be setup for MVVM in minutes.
I'm glad you enjoyed it.
Thanks a lot always high quality video.
You are welcome.
Tim, this is by far the most complete and understandable MVVM tutorial I have seen.
Great Job. I have a grasp now.
Excellent! I'm glad you have a better understanding of it now.
Please do MVVM Implementation form scratch without Caliburn Micro. That will be very helpful.
Thanks for the suggestion.
@@IAmTimCorey wow, replying to comments on a two year old video. Always a good sign
You read my mind! I too wondered how much code might have been required for a given scenario. I suspect this would make the argument for using a polished framework. Also I wonder if C# and WPF may have evolved over the years to require fewer add-ons. PS. @IAmTimCory, I'm really enjoying the content and will consider taking some of your courses in future. Cheers!
Yes, that would indeed be very helpful. There are many comments in the video about keeping your code human readable yet it seems Caliburn Micro obfuscates many of the connections between view and viewmodel making it difficult to follow what's happening without knowing all it's documentation by heart. Surely that too would be forgotten 6 months down the road especially if it is no longer maintained as other comments suggest and would probably be true for any other 3rd party framework for doing MVVM. Perhaps .NET just hasn't matured in regards to MVVM since there are so many tools around to make it easier...
It's now 1:01 AM in Australia, and I just watched up to 1:03:41. I really like and appreciate your effort to write clear if condition and dodge the negation in the boolean expression. And I agree! Somehow, dealing with negation can be tricky - it tripped me over so so many times in the past, and yet, it is used by many devs carelessly. Keep up the good work!! Love how you not only explore the framework but also promote clean code.
I appreciate the kind words.
Great video and explanation as always. Do you have any plans to do a plain vanilla intro to MVVM /WPF? Your teaching style is the best and I know I would get a lot out of such a video. Others would like it also from the comments I am seeing.
It is a possibility. Not sure yet but thanks for suggesting it and showing interest. It helps me gauge the audience.
IAmTimCorey Would like to say I’m also interested for vanilla MVVM and as always it was a great course thanks for your work.
Whats not to like about this, pace is great, voice is soothing and content is relevant and thorough
I am glad you enjoy the content and the presentation method.
Hi Tim, is there a video from you showing how to do page navigation with MVVM?
I thought this would be another waste-of-my-time video, but wow! Your explanation is very good and makes a lot of sense. Thank you!
I am glad I didn't waste your time.
4:32 He didn't mention it, but when deleting that make sure not to get rid of the greater than symbol.
Thanks for sharing.
I don't comment in most cases, but you deserve a very big thank you
I appreciate it.
Great resource! You say at about 19:32 that "the entire thing is the user interface". Does that mean the business logic happens outside the three M, VM, and V folders we create?
Correct. MVVM is just about user interface. It does not represent the traditional three layers of an application. It is three layers for the UI.
@@IAmTimCorey Hmm. In that case, I am quite confused about the utility of the "M" in MVVM.
This is really helping me with a greenfield project that I'm handling all by myself which was extremely overwhelming, this is literally putting food on my table.
Thank you.
Glad it was helpful!
Great explanation, but there's one thing I couldn't figure out how the CanClearText function works? What makes it work exactly? I understand the idea that the ClearText function is enabled but don't understand how CanClearText is enabled? And I probably missed the explanation regarding the matter that the ClearText function should receive parameters, I didn't understand why this should be done
I am with you, great tutorial but there is no explanation of how the CanClearText and ClearText communicate with each other. This part of the tutorial completely lost me :(
@@MikePL101I've just been watching the video, but am yet to try the code and I too was originally confused by how that function managed to get wired up to the button so I rewound the video back to where Tim starts talking about this function and it sounds like all you have to do is create a function that returns a Boolean, and the name of the function has to match the original button function name, but just needs the word Can appended to the beginning. That's why it's called CanClearText. It wouldn't work if was called by any other name. It must be a naming convention that is required and then it simply works.
Of course, when I say function, I mean method. Old habits are hard to change. Been coding for over 40 years.
OMG Thanks a lot, i do in 1 hour something a i take 2 days just setting up the project, i feel i was trying run before even learn to walk. cal and you save my life.
I am glad it was helpful.
awesome everything ok until 1:17:31 I got an error the method ActivateItem() does not exist in the current context. I tried to continue ignoring the error but it keeps there.I'm inheriting from Conductor. There's a method called *ActivateItemAsync()* i tried it but it doesn't work. Help please
Same issue here
@@elvisayo man I heard Caliburn it's not further getting support and for new projects better find other framework
ActivateItem (at 1:17) is replaced by ActivateItemAsync
public async Task LoadPageOneAsync()
{
await ActivateItemAsync(new FirstChildViewModel());
}
You can, but don't have to replace
I love Martin Fowler's design patterns... and an mvc-ish structure for WPF is just utterly brilliant!
Yep, there is a lot of good stuff in those design patterns. The key is to not go too crazy with design patterns so that you make a simple application overly complicated. As always, balance is key.
IAmTimCorey Indeed!
Wow, this seems Brutal for making GUIs. All that XAML typing and work just to add a combo box and some test. Holy cra* man. No thanks!! I'll stick with VB6 and WinForms. 0.o Can't I just drag and drop a combobox width and a text label??? Good grief man. This was a great video to show me why I never want to use WPF! Hahahaha.
It is actually not that bad. WinForms is a bit harder to work with on some of the fronts than WPF apps
Tim, so much thanks. This video is 100 % accurate for the purpose. The speed and the organization of content is just exact. I learnt a lot.
I was able to build what I wanted to build by following every second of this video. Each second of the video was only helpful. I am going to refer all your other videos for my requirement of learning and building.
Thank you. I am glad you found it helpful.
Caliburn Micro: No longer under active maitenance
This is a very good reason not to rely on external frameworks, kids.
Thanks for emphasizing the point!
@IAmTimCorey It's a little unfair to be getting this kind of criticism on a very informative video you went through the effort to make several years ago. I appreciate your optimism and maturity in regards to unnnecessarily callous comments however I think people like *squints at name* @スリンキ--Slinky need to put the keyboard down and watch your video titled "Caliburn Micro Is No Longer Being Maintained. Now What?" before chiming in.
I for one will be scouring your video list for other MVVM framework examples to determine whether or not my next cross platform IoT project, that utilizes C# in the Windows portion of the software, will be using something other than Caliburn Micro. I don't mind the difficulties that came with wrapping my head around this framework, but I do recognize its shortcomings. Either way please know that your work here in this video is deeply appreciated and will be useful long after .NET becomes incompatible with this sunsetted framework.
It's more than alive and new version are released. get rekt
Very great tutorial and instruction. Similar in style to a fantastic instructor I had a few years ago, you'd probably do well in classroom instruction.
Only thing I was a little disappointed there was no touching on dealing with multiple windows in Caliburn, but you gave enough of a foundation that I can reasonably understand the results of my searches now. Even feeling reasonably proficient with C#, without much familiarity with XAML and zero with Caliburn search results / stack overflow read like Greek!
I work with multiple windows in Caliburn Micro/WPF in the TimCo Retail Manager series here on RUclips: ruclips.net/p/PLLWMQd6PeGY0bEMxObA6dtYXuJOGfxSPx
Thanks for this great video! One question, which MVVM framework you recommed in real project? Prism, MVVMLight, or the one in this video? thanks a lot
All of them will work well. I recommend Caliburn Micro because I like how it is set up and the opinions it has. I don't do anything in my videos that I don't recommend for production unless I very clearly state that.
Thanks!
I was getting so frustrated because the program didn't want to do what it was supposed to do.
I changed the Caliburn.Micro from the newest version to 3.1and it worked. Programmers struggle I guess. :D
Thank you for all that you do.
Yep, the latest version has some breaking changes in it. We cover how to use it in the TimCo Retail Manager series when we upgrade to .NET Core.
So, Caliburn Micro saves you few characters on every binding, but takes away all the refactoring features of strongly typed language of C# + XAML. Not nice :) when you setup DataContext in XAML, you get full InteliSense on ViewModel properties in bindings.
It does a lot more than that, but I understand.
@@IAmTimCorey I am sure it did much more, but binding by name convention seems odd. If i rename a view model property, i have use text search to change all bindings. I know from experience that I often use the same names in different view models (like IsBusy), so I would have manually check whether given IsBusy is from correct view model.
I am aware that with Calibur Micro I could just use unique names, but we all know how that ends , especially in a team.
Great video though, I watched it all which is weird since I don't like the technology. Thanks :)
Can't thank you enough for this video. I always had issues with tying some of the concepts of MVVM into practice, but after watching this and implementing the demo myself, I feel i have a much better understanding. Time to get working on refactoring a ton of old code.
Glad it helped!
Am i the only one that hates frameworks that do all that sort of automagical stuff just by having things named certain ways? I kinda like manually connecting the parts and eg telling which viewmodel connects to which view, rather than letting some framework try to figure it out...
Nope, you aren't the only one. I'm normally not a proponent of them but I make an exception in this case because of the adoption of it, how easy it makes MVVM, how much it provides that I would otherwise have to do myself, and the long-term support it has been given. But I totally get doing it yourself so there is no magic.
I hate also this kind of framework. I will not use it in my WPF project. Learning WPF is enought work (it worth it), therefore I dont want to learn a framework to be used for another framework (WPF).
Finally a Video worth watching! Literally watched it from the beginning till the End. Really appreciated thanks alot. Unlike other Many videos well explained.
Great!
As an Android developer who also likes MVVM this looks really clean. Looks a lot nicer than the implementation we use over in Android land, very structured.
I'm glad you like it.
Thanks Tim, you are literally doing miracles with your tutorials keep it up. I would like to see you do a start to finish payroll tutorials, analysis especially, thanks.
I'll put those on the suggestion list. Thanks!
Went through your Fundaments intro into wpf and it wet my whistle enough to learn more before moving on. Looking forward to the new things I can do with it.
Excellent!
Excellent video on the MVVM topic!
I would love to see another fantastic video where Tim designs his own MVVM framework without using any third-party libraries.
Thank you. I have added this to Tim's list of possible future topics.
I would also love to see this!
Love the video. Makes learning a lot more simple and enjoyable - please keep up the fantastic work! :-)
Found something about Caliburn Micro connections/associations that I think is worth noting.
1:04:53 "Since we pass into the ClearText(), we can also pass into the CanClearText()"
However, it looks like we don't need to pass firstName and lastName into CanClearText(), using the corresponding public properties instead:
public bool CanClearText()
{
if(String.IsNullOrWhiteSpace(FirstName) && String.IsNullOrWhiteSpace(LastName))
{ return false; }
else
{ return true; }
}
works just fine.
The ClearText(), for it's purpose, does not need those parameters passed in - BUT IF WE DON'T pass those parameters into ClearText(), CanClearText() just does not get invoked (and naturally, the button auto-disable/enable doesn't work).
So, it looks like passing the seemingly unnecessary parameters to ClearText(string firstName, string lastName) actually establishes the "magic" link between changes in FirstName/LastName and CanClearText(). Pretty counter-intuitive if you ask me :-)
Yep, that's what creates the magic.
Man - this is an awesome tutorial mate; Excellent coverage of all the main basics of MVVM - especially the Conductor patterns.
Thank you!
Can I like this video more than one time? Great teacher and great video.
Glad you liked it!
Thanks you Tim, yesterday started with introductory video on WPF, today completed this video, getting a feel of it.
You are welcome.
thank you. clear voice. slow tone but not too slow. just right. enjoyed it.
I'm glad you enjoyed it.
Great work Tim,you made it very easy to understand, the active item thing made my life much more easier. i as a beginner was creating new instance of a user control everytime i want a new page and having a goback button in the new page now.
Thanks for trusting Tim to help you along in your coding journey
Tim, these are really great tutorial videos. Thanks for doing them.
You are most welcome. Thanks for watching.
Thank you! Finally I was able to understand MVVM, everything is detailed and understandable
Awesome!
Please make more videos on MVVM, for example work with streams or with sockets, thanks
I'll keep those topics in mind. Thanks.
Please help me, I opened a new view in Content Control and added a button there to change this view to another one, for example to page 2, but in ViewModel I can not call Activator again. Because there is a Screen inherited there and not a Conductor, Tell me how to switch to another a page from FirstViev in SecondViev
That was a great course, especially for someone like me who is trying to move off WinForms. Thanks again!
You are most welcome. Thanks for watching.
Thanks Tim, this actually enabled me to understand MVVM in general, but will be using CM as a tool.
Excellent!
Thanks Tim. Great lesson. To be watched more than once to be fully understood, at least in my case.
You are welcome.
I really liked this video. This actually encouraged me to create my own version of caliburn micro which has some features that caliburn micro does not have.
Excellent!
Followed through this, and found it extremely interesting. Thank you! It would seem the pitfall here is the way that everything hangs together based on 'names "hooking up" ' and the mechanism thereby "works" . . . but that the application still builds fine if there's a typo in the naming that breaks the mechanism(s). This seems a slight retrograde step from WinForms, where a typo usually results in an immediate "yell." (For example: one could envisage mayhem if some text replacement operation to the source-code was botched: everything still builds OK, but the some of the functionality driven by the naming stops working). Perhaps in later installments you might be addressing those sort of concerns, but this comment is obviously coming from a very ingenue perspective. WPF certainly opens up some interesting UI ideas. Thanks again.
I will add it to the list. Thanks for the suggestion.
Большой брат ! Благодаря тебе , начал изучать C# и WPF. Удачи и здоровье тебе !
I am glad it was helpful.
Thanks for your work. It gave me the right insights to start without too much initial burden.
Great to hear!
Excellent Tim looking forward to more on WPF and Caliburn Micro
Great! More is coming soon.
Thank you so much Tim. I'm going plan to switch my company framework from MFC to WPF (My company still hold an very old framework). This is very good reference and start for me.
Thanks
Best of luck!
Thanks, I wanted to check out MVVM and this was a great place to start. I worked through it with the older CM 3.x versions and then upgrade to 4.x which wasn't too difficult beyond changing to use the async methods.
Glad it helped!
Great video.
An addendum to this. You can use the normal binding for anything. Thus you could use if you want. This is useful if you want to change the Mode or the UpdateSourceTrigger so the button updates on every keypress. HOWEVER - if you do this and want to use the property in a guard function (CanXXX), you STILL need to name at least one object for this property in the page/control using the Caliburn Micro conventions. If you use a CanXXX property and handle the NotifyPropertyChanged yourself, it isn't an issue.
That is why I usually use the property version of the guard and keep track of the notify's myself. The advantage is that if a button isn't disabling, I usually will look in my ViewModel first. If I am there, I don't need to open a second file.
I just thought this might save someone a little time.
Thanks for the tip.
Thank you Tim. Greetings from Germany
You are welcome.
Thank you, it was a bit slow because of some parts with no relation to MVVM or Caliburn Micro (like the rows and column definitions etc) but it still helped me to learn how to start with MVVM.
Glad it helped!
Great work Tim. You are one of the best. I suggest that you make a full detailed course about Caliburn Micro. Such course will be a hit, and I definitely will buy it. Keep on the good work.
I have an add-on course for my C# Application from Start to Finish course that is all about Caliburn Micro. I believe it is 7 hours of content.
Hello sir thank you , you don't know how lucky I am to find your channel and find great teacher such as you , I live in third world country and having access to your videos really changed my life , you are one of if not the only reason I love C# . your way of teaching it really blows my mind .the fact that you keep going back to your 4 yo videos and answering questions shows that you are guy with great character . I've been helping my friends and teaching them C# , and every time they ask from where I learned all that i point them to you, i learned lot of stuff from you not only programming but also the way you slow talk when teaching again thank you . And i have question , do you think Caliburn Micro is good choice in 2021
It depends. If you don't mind staying with .NET 5 and below then yes, I think it is a great option. Otherwise, you need to think about other options like MvvmCross or Prism.
I'm learning alot from your content! Keep it up mate, cheers from Australia !
Glad to hear it!
Even If your content is obsolete I love to work with you on that. You are great
I would push back on the obsolete comment. This code is still valid and fully supported by Microsoft to this day (and beyond). Also, businesses don't work only on the latest version of .NET. There are a LOT of developers out there working on older versions of .NET and the .NET Framework.
We're learning WPF in school at the moment.
Thanks for the video, I'm still struggling with it, and your video does help a lot.
Great vid! Caliburn Micro seems very powerful, it automates a lot of things. But I would have preferred a more classic approach to MVVM (without Caliburn). Since Caliburn does a lot of things behind our backs, it also has the disadvantage of preventing us from really pinpointing aspects of the MVVM, which is just my opinion, but Caliburn should be used AFTER mastering the "classic" MVVM.
I debated that but it does feel a bit like reinventing the wheel to see how to do it.
Nice Tutorial, I just want to learn some frontend technology, I have unity3d background, I want to learn some other front-end tech, want to choose WPF, electron, or browser app using js, ts or react. But finally I see your video and decide to learn WPF, thanks for your great effort.
Great!
Hi Tim, I love your explanation and patience. I'm a .NET / WPF Rockie Dev but I hope to get used to it soon.
Just for the record, try not to do large videos because it's kinda difficult to follow the subjects. 20/25 min per videos will be fine.
Thanks a lot.
The problem with setting a timer on a video is that I then have to cut out things that are important but don't fit into the timeframe. I can't be patient and explain things and also meet a set deadline. I try to avoid overly long videos but at the end of the day, time isn't my biggest concern.
@@IAmTimCorey It's okay for me.
BTW. Have you considered to do WCF tutorials?
It is on the suggestion list but pretty low since WCF is mainly an outdated technology, eclipsed by things such as WebAPI.
I think this was explained in clearest way possible. Thanks a lot ^
Awesome! I am glad you found it clear.
A great scratching of the surface ... makes me want to look deeper on down.
There are things other than combo - text - labels and buttons that I really need to look into.
Course add on purchased!
I hope you enjoy it. Yep, the add-on course goes through a lot of situations that I think you will find useful.
Thanks Tim, it is a great video. Name conventions actually is something like magic
You are welcome.
Hi Tim, like everyone else I am so so very grateful for all your hard work on producing your videos. You are now my go-to resource and I don't know what I'd do without you.
Quick question, I've seen your more recent video about moving to MVVMCross, as it had been announced that CaliburnMicro wasn't to be supported anymore. I'm about to start a new WPF project, I see that Caliburn seems to have been updated relatively recently (version 4 and subsequent fixes I'm guessing). Is it still a sensible choice?
Really love this, and would love more. Is at the moment going through the TimCo series.
Great!
Here is my vote for Tim to pick up the CM project!
I would love to but I just don't have the time.
Thanks a lot Tim! This video is exactly what I needed.
You are welcome.
Tim, thank you so much for this amazing video. I'm finally starting to understand MVVM and I'd be very grateful if you could talk a little more about Caliburn.micro. 😁
I'm glad you enjoyed it. I'll be using Caliburn Micro in the future for other WPF videos but in the meantime, I did create an add-on course for my C# Application from Start to Finish course that is 7 hours of Caliburn Micro content, in case you are able to purchase it. If not, no worries, more content is coming in the next few months.
Dear Tim,
Thank you for this phenomenal tutorial. It is a pure gold, i have to say!
I have one dummy question:
private BindableCollection _people = new BindableCollection();
public BindableCollection People
{
get { return _people; }
set { _people = value; }
}
Why in the constructor we are using People.Add(new PersonModel { FirstName = "Tim", LastName = "Corey" });
instead of _people.Add(new PersonModel { FirstName = "Tim", LastName = "Corey" });
What is the difference?
Thank you in advance and keep up the good work!
Vasko
We use the public version of the property instead of the private backing field in order to keep any logic in place. Basically, we avoid ever touching the private backing field outside of in the property itself. That way, if we protect what can be set or what the user can see, those protections are not bypassed.
Thanks bro u r the best man!!👍👍
You saved my semester!!!!
Excellent!
Можно сказать, что впервые пишу комментарий, и этот комментарий является благодарность за ваш урок) Спасибо)
I appreciate it. I am honored to be your first comment.
Hey this is as alway a great explanation.
Just what I was looking for.
Excellent!
It opens me up a world of possibilities 🤓
Great!
7:38 drinking something huh? lol ! nice video Tim. Im learning a lot with your content. Thanks man!.
I try to use the pause to keep those out but it sounds like I cut it too close. Yep, got to stay hydrated.
I think there needs to be a pinned comment about how to get this working with VS2019 and exactly which .Net Framework is supported. The only way I was able to get the App.xaml to configure without errors on VS2019 was to use the latest alpha version of the Caliburn.Micro package and version 4.6.1 of the .Net framework.
Anyway, keep up the good work.
I would recommend following along using the .NET Framework instead of .NET Core since there are other things that will trip you up as well. I do cover moving your WPF project with Caliburn Micro from .NET Framework to .NET Core in the TimCo Retail Manager series here on RUclips. We cover using the alpha build and changing a lot of the calls to async.
i want to give you more than one like
I am glad you enjoyed it.
Tim Corey quote of the day. It looks like Garbage. It does.
lol
Thanks Tim, again very good video and explanation.
It would be great if you do a second part. For example explain where I put functions and do my logic stuff. Cause I have some trouble to understand where to fill the BinddableCollection when I don't want to do that in the View Model.
I will add it to the list. Thanks for the suggestion.
Hi Tim,
What is your opinion/solution to the following problem:
At work im mainly creating WPF desktop applications and many guides and frameworks tell me to create two folders /ViewModels/... and /Views/... but when my application gets bigger there is always the point where my two folders get really big and there is almost no connection between the views in the view folder and the viewmodels in the viewmodels folder (except for some base classes of cource). So my thought on this was/is that a viewmodel and its corresponding view should be placed side by side in one single folder (e.g. MVVM/AddUser/AddUserViewModel.cs and MVVM/AddUser/AddUserView.xaml) . If I change one of them the other one often has to change to therefore placing them in the same folder combines them logically.
Is it best practice to add a ViewModel for the User Control?
There is a lot of people who argue that a User Control should NOT have it's own ViewModel. This makes sense for simple applications. But for large applilations I find it benefisuial to add a ViewModel to make "Parent" ViewModel a bit simpler. What is your recomendations?
Yes, Thanks very much for this and all the other videos!
You are welcome.
I like the Button functionality that you've explained in Caliburn.Micro.
One potential problem is if you are working in a team, and you've deployed a project which incorporates these features, but other members of the team don't use Caliburn.Micro. Then, one day, another member of the team has to dig into your project for some maintenance reason. He or She comes across these "useless" parameters being passed in to ClearText and CanClearText and thinks.... WTF is this?
Alternatively, if you simply bind the Enabled property of the button to an associated boolean property in the ViewModel, it's more long-winded to type out for you but the intentions are clear for someone else who comes upon your code later on.
On balance I am swaying towards the make it clear for someone else option.
In principle I agree, although in this case I'm not sure I would go this direction. If you are in an environment where others might work on your code, they should either know how Caliburn Micro works (in general at least) or I would recommend against using Caliburn Micro at all. If that was the one sticking point then I would do what you are recommending but if that is an issue, probably some of the other bindings will be an issue as well, in which case using CM probably isn't worth it.