Тёмный
No video :(

C# WPF Tutorial #24 - Using RelayCommand in MVVM 

Kampa Plays
Подписаться 6 тыс.
Просмотров 24 тыс.
50% 1

Continuing to implement the MVVM pattern, adding RelayCommands so that we an bind our button commands to actions in our view models!
Happy Coding!
Chapters:
0:00 Setup
0:37 Button Command Binding
1:00 Implementing ICommand (RelayCommand)
4:25 Using RelayCommand
6:00 Using Predicates (CanExecute)
8:40 Recap & Tips
9:20 Next Up

Опубликовано:

 

8 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 193   
@IvisibleCat
@IvisibleCat Год назад
Please!!! dont stop with this series. I can learn a lot about WPF with your videos.
@KampaPlays
@KampaPlays Год назад
Thanks so much! I will be back at it soon, still playing a bit of catch up at work.
@IvisibleCat
@IvisibleCat Год назад
@@KampaPlays Nice to hear! :)
@elasdebastos235
@elasdebastos235 4 месяца назад
yes please
@MrLesBerg
@MrLesBerg 2 месяца назад
@@KampaPlays Thanks for the videos! I haven't coded in C#/.NET since 2010 and I need to make a tool to work with multiple json files.... Not only has the refresher been good, but a lot has changed since then. I have to build an app that uses 39 json "loot table" files that are all different and create a UI that allows users to edit the files in an understandable manner, then save them again so they can be used by a multiplayer game. Not only do I not have any control over the file format, none of the files contain a complete listing of everything that _can_ exist in them. Since a person can use the tool/app to completely keep an item from spawning in-game (a specifically requested feature) would prevent them from adding it back, one of the tasks I have is figuring out how to combine the "default" files into a master 'database'. I _also_ have to collect the various values of the properties in the files as those could be lost as well. So not only do I need to figure out how to build a single reader that can interpret all the files (that will also hopefully work with future versions of said files), I need to implement a configuration file and a local data file that contains all the possible things, places, and categories (all just different values of 'Name'), rarity values, etc. LOL, then I have to be able to spit it all back out into 39 modified .json files and I don't even know if making structural changes to the files will keep them from working. I know I can add/remove certain levels of child nodes, but the position of those specific child nodes changes from file to file...
@scz5996
@scz5996 Месяц назад
@@KampaPlays " You see, in the theory of general relativity soon can be soon or not that soon. It depends" ~anonyme
@user-xf7dn4jt7w
@user-xf7dn4jt7w 5 месяцев назад
Thank you so much for this series. Many people around the world is watching this series even now.
@KampaPlays
@KampaPlays 5 месяцев назад
Thank you!
@MuhammadAbdullah-sd2kk
@MuhammadAbdullah-sd2kk 19 дней назад
Man thank you so much, i could not have learnt this stuff without you so fast
@EllieB-K
@EllieB-K Год назад
Honestly the best tutorial on WPF so far! You rock!
@KampaPlays
@KampaPlays Год назад
Thanks so much!
@Ferd_Learning-sw8ny
@Ferd_Learning-sw8ny 6 месяцев назад
I agree, good and short videos, better than some very long videos
@BryanDouglas44
@BryanDouglas44 4 месяца назад
Extremely helpful series. Thank you so much for putting these on RU-vid. Like others on here, I hope to see this series continue.
@KampaPlays
@KampaPlays 3 месяца назад
Thanks so much. Hope to continue soon!
@hanzhang4592
@hanzhang4592 2 месяца назад
@@KampaPlays Lets go!
@hotbreadloaf6009
@hotbreadloaf6009 6 месяцев назад
Nothing but praise to this amazing series! I really hope work/life slows down a bit so you can continue these awesome tutorials.
@AhmetYigiter
@AhmetYigiter 6 месяцев назад
Yes, absolutely 💯
@KampaPlays
@KampaPlays 5 месяцев назад
Thanks so much. I'm thinking (and hoping) that I will have enough time to really get back at it by late spring.
@baldgeek1
@baldgeek1 4 месяца назад
It would be great if you contiued this series. I'm an old school coder starting to learn these new fangled ways of doing things. Your tutorials have helped!
@KampaPlays
@KampaPlays 3 месяца назад
Hopefully soon, very glad to have helped!
@Leo-pq9tq
@Leo-pq9tq Месяц назад
Great videos, very complete for beginners and easy to understand, hope to keep learning from you some day
@flacuchentxox3129
@flacuchentxox3129 2 месяца назад
You have no idea how much you saved me. I applied for a JavaScript job, but they recently wanted me to make a Windows application using WPF. It's very different. I had no idea about MVVM and data bindings. Your videos helped me a lot with building the base of knowledge in WPF, and even after 5 months, I still come here to relearn some stuff because you are the only one who explains things well, at least for me. Your videos are mostly basic stuff, but VERY essential. I appreciate all your work in making these videos. Greetings from Chile.
@shafialanower3820
@shafialanower3820 Месяц назад
Do you mind sharing how did you get the JavaScript job? Networking or online application? Did you have a lot of experience? Have any recommendations for a junior web dev ?
@flacuchentxox3129
@flacuchentxox3129 Месяц назад
​@@shafialanower3820 I had just graduated from university, so I had no work experience, I simply printed my resume and went to an industrial area and entered an office warehouse of a store that sold PC components, they rejected me immediately because they did not need personnel, However, I was lucky because before I left, the person in charge of the IT area called a friend (my current boss) and asked him if they needed a programmer or something related, he said yes, because a guy had resigned the month previous and they were still not looking for replacement. So I went (their office was across the street) and they hired me right away, they asked me the things I knew, I was honest and told them I know such languages ​​and I have such knowledge, but I am characterized by learning very quickly, and there They hired me. I hope my story is of some use to you xD, actually I also looked at jobs online, but everyone asked me for experience and I didn't have the opportunity to even appear for an interview to try to convince them. Now im just earning experience for a better job.
@crackedboy701
@crackedboy701 Год назад
i just finished watching this video. can't wait to watch the next video. please continue making this series i've learned a lot from this series and i thank you very much for it.
@KampaPlays
@KampaPlays Год назад
Thanks so much! Will do.
@highestdremas7654
@highestdremas7654 Год назад
man this tutorial is crazy good, you just got a subscriber, Please update the course weekly
@KampaPlays
@KampaPlays Год назад
Thanks so much! I try to do one/week, but lately and for probably a couple more months, work is slowing me down a bit, but I'm still at it!
@MYKhanFromThe90s
@MYKhanFromThe90s 22 дня назад
Amazing tutorial as everyone else has already said! Hands down the best WPF explanations on youtube. We are still waiting for the video titled 'Coming Soon!' though 🤣🤣
@janbjorkenfjall1289
@janbjorkenfjall1289 6 месяцев назад
Thank you for these amazingly good tutorials. The best I've found. I do hope you will keep doing them.
@KampaPlays
@KampaPlays 5 месяцев назад
Thanks so much, I'm hoping to be able to have time to get back to them by late spring.
@VijayalakshmiS-ck8jj
@VijayalakshmiS-ck8jj 8 месяцев назад
This tutorial really encouraged me to learn more on WPF! You are doing great job, waiting for the upcoming series!
@KampaPlays
@KampaPlays 8 месяцев назад
That's great, thank you!
@thomasaminer
@thomasaminer 6 дней назад
Thank you! I really hope the multithreading episode will be released some day! 🙂
@triadicbus4908
@triadicbus4908 Год назад
Just started using WPF and this is by far the best tutorial ive found. Subbed for future stuff.
@KampaPlays
@KampaPlays Год назад
Thanks so much!!
@Foxe92
@Foxe92 Год назад
Just wanted to say, these videos are fantastic! Can't wait for the next one!
@KampaPlays
@KampaPlays Год назад
Thanks so much, will be jumping back in soon!
@user-bh7is8lo7r
@user-bh7is8lo7r Год назад
"Wow, your tutorial videos are absolutely amazing! The best one I can say from all the turorials I have checked. I can see your passion for teaching. Even with the small details. Your tutorials have been instrumental in helping me as a starter. Thank you for sharing your knowledge. Keep up the fantastic work!"
@KampaPlays
@KampaPlays Год назад
Thanks so much, I really appreciate it and am glad they have helped!
@Pelleplop
@Pelleplop 4 месяца назад
The best WPF tutorial out there!!!! A huge thank you for creating this! As a self learner I'm really looking forward to the next episodes. 😃
@KampaPlays
@KampaPlays 3 месяца назад
Thank you!
@AlcacerHoldings
@AlcacerHoldings 8 месяцев назад
So glad I came across your channel... Haven't understood C# and Wpf so easily as I do now... Will surely be waiting for more videos Thanks a lot
@KampaPlays
@KampaPlays 8 месяцев назад
Thank you. Very glad to help!!
@shir00didi
@shir00didi Год назад
Thank you a lot for making this WPF tutorial, very concise and helpful! Waiting for the next video :)
@KampaPlays
@KampaPlays Год назад
Thanks so much. Hopefully I'll be back at it soon!
@chicksterossdy
@chicksterossdy Год назад
I learned so much from this series that I can now apply to my homework :D Thanks man, keep it coming!!
@KampaPlays
@KampaPlays Год назад
Awesome!! Thanks!
@kisjoke91
@kisjoke91 6 месяцев назад
I enjoyed watching this little crash course, the topics you selected are covering everything needed for a starter project. Thank you for your time you have been putting into this series.
@KampaPlays
@KampaPlays 6 месяцев назад
Awesome, thanks so much!
@mkmerlinyt
@mkmerlinyt 6 месяцев назад
Can't wait to see more. Please don't stop publishing and if you have more bring it on the table!!! :-)
@floriandraxler3868
@floriandraxler3868 4 месяца назад
Very simple up to the point video that is suitable for me as a beginner thank you
@KampaPlays
@KampaPlays 3 месяца назад
Glad to help!
@user-fh3sr2lr2x
@user-fh3sr2lr2x 10 месяцев назад
I am waiting for your next youtube series about WPF. It was so good time to step here with you. I am touched. Thanks a lot~~!
@KampaPlays
@KampaPlays 10 месяцев назад
Thank you!!
@greatooau
@greatooau Год назад
Loved your series :), it's the best WPF series i've found on YT
@KampaPlays
@KampaPlays Год назад
Thanks so much!!!
@isakjones5836
@isakjones5836 4 месяца назад
Your tutorials are amazing! Hopefully your work slows down so you can keep these up because they have helped me immensely!
@KampaPlays
@KampaPlays 3 месяца назад
Thank you!
@thesm9734
@thesm9734 8 месяцев назад
BEST TUTORIAL EVER on WPF !!!! I have a subscription on LinkedIn Learning, but not even they could teach me as much as you did. Thanks a lot!
@KampaPlays
@KampaPlays 8 месяцев назад
Awesome, thank you so much!
@latinchakma9725
@latinchakma9725 5 месяцев назад
I have been loving these tutorials!
@KampaPlays
@KampaPlays 5 месяцев назад
Awesome, thank you!
@shayansohail9503
@shayansohail9503 Год назад
Wow, you provide verys simple explanation to seemingly complex topics, Thanks
@KampaPlays
@KampaPlays Год назад
Really appreciate that!!
@laszlopallag7495
@laszlopallag7495 9 месяцев назад
Hi! Software engeneer in my final semester here! I just finised your series, and i must thank you, because it really helped me a lot. I had a lot of stress towards coding because i found it challanging and scary after my past experiences with it, and i was at a point where it easily gave me panic attacks to open a Visual Studio. I really thought that Software engeneering is not for me, but was scared to change majors this late. I not only learned from your series, but with your style of teaching, i got used to concepts and functions in coding, and i am proud and thankfull to say that i no longer have fear towards programming, i just need to learn more about it, and get familiar with it. This is all thanks to you, and how you introduce everything in this series, in a way thats understandable, short, and yet helps me to see how it would work in real life. If you continue this series, i'll keep following it, since it's the best one i have ever seen (And belive me, i watched a lot of 2+hour tutorials). But if not, for whatever reason, i still want you to know that your efforts in these videos saved my future carrier. Thank you!
@KampaPlays
@KampaPlays 9 месяцев назад
This is amazing. Thank you for writing, it means a lot. Great job powering through, it will pay off!! It's easy to get overwhelmed in this world, even for people doing it for many years. Just remember that the computer does only what you tell it to do, and take it one line at a time! :) Work(s) have been busy but I will be continuing as soon as I can. I wish you the best; thanks again!
@fRiTZL0NE
@fRiTZL0NE 6 месяцев назад
3 plurasights courses just to understand what the commands are good for, took you 6 min to explain. Well done and thanks!
@KampaPlays
@KampaPlays 5 месяцев назад
Thanks, glad to help!
@sadaqat4728
@sadaqat4728 9 месяцев назад
Hi @kampaplays , thank you very much for this detailed and to the point tutorial. I have no previous knowledge in wpf and I had an interview in coming week. I am following your tutorial to be prepared for the interview and its very helpful.
@KampaPlays
@KampaPlays 9 месяцев назад
Great job getting prepared, I hope your interview goes well! If you think about, let me know how it goes!
@athiraanilkumar887
@athiraanilkumar887 5 месяцев назад
The content is really good and how you explained everything is so clear and understandable. I felt that you have covered most of the stuff needed for a beginner in WPF. So far the best WPF tutorial I've seen. I have a request, can you please make a video on using Telerik in WPF applications.
@KampaPlays
@KampaPlays 5 месяцев назад
Appreciate that! Do you have any specific wishes for Telerik controls or just how to incorporate the library, etc?
@Jacke500
@Jacke500 10 месяцев назад
love it, every word you say actually has meaning to it
@KampaPlays
@KampaPlays 10 месяцев назад
Thanks so much!!
@jerrybirmingham7536
@jerrybirmingham7536 7 месяцев назад
Wow, great series I'm in my 50s now, and I've been working with Excel for years (as a "hobbyist"). Someone where I work created an ordering form (in Excel). Its structure and performance really offended me, so I had to fix it😃. And I did (from home) problem was I had a newer version then they had at work and I didn't want to do the crazy (unnecessary) work to make my form work in their older version. I've played with C# in the past (for an Arduino project) and had a lot of fun doing it. So, I started on a quest to see what I could do with that. Then I found you and WPF 😁. True, I don't fully understand everything, but I am getting the hang of things a little at a time 😄. I really enjoy coding but I think I'm a little to old now to be jumping careers 😪(this stuff is crazy intense 😮 sometimes) but I thank you for making your videos it's been fun trying to" play with something new (at least new to me). I can't wait to continue working on different/new projects with you Thank you, and I wish you well 😃
@KampaPlays
@KampaPlays 7 месяцев назад
Excellent!! You sound like a software engineer to me, especially getting offended at structure and performance! 🤣 Keep at it, and even if you don't want to leave your current job, there's tons of remote/freelance gigs out there if you want to turn your tinkering into dollars!
@dm-oz9yd
@dm-oz9yd Год назад
Excellent. Exactly what I was looking for.
@KampaPlays
@KampaPlays Год назад
Great!!
@ryuMavros
@ryuMavros Год назад
Ty. I love your videos
@KampaPlays
@KampaPlays Год назад
Thanks so much, I'm very glad its helpful! Will be back at it soon.
@M3rtyville
@M3rtyville 9 месяцев назад
I started my internship 4 weeks ago and got to work with WPF the first time there. Not much was explained and it looked simple enough to work with. It went well until I got stuck on a problem and no matter what I looked at, I didn't get what i needed. So I decided to watch your videos which made me understand how WPF actually works. I fixed my code a bit and customized it a little cosmeticly. Just can't get the styles to work for some reason which I would have liked to get rid of some redundant code. However, I still didn't manage to solve an issue. What my program does right now is that it has 3 textboxes, a button and a datagrid. 3 are reading the input and 1 of the text boxes uses 2 inputs to calculate something using those values and show it on the one of the textboxes. Everytime I change the parameters and click the button, it shows a new value. Now I want the Datagrid to do the same but instead of just showing 1 solution, it suppose to show 25 different solutions. I want to create a table that gets generated whenever the button is pressed just like the 3rd textbox does and change whenever I change parameters and click the button. First column suppose to show the numbers 1 to 25 and the second column calculate using the parameters from the first 2 textboxes times the value of the first column that is in the same row. That is the major thing I am stuck right now.
@KampaPlays
@KampaPlays 9 месяцев назад
You will likely need to bind some ObservableCollection type to your dataGrid and from there create and populate your data so it displays correctly. I don't have anything specific to that yet - but this may be helpful if you are still having issues. (sorry for my delayed response) stackoverflow.com/questions/24539022/how-to-bind-wpf-datagrid-to-observablecollection
@user-fn7wt5bd1w
@user-fn7wt5bd1w 10 месяцев назад
You are amazing and i love your tutorials from Egypt
@KampaPlays
@KampaPlays 10 месяцев назад
Thank so much!!!
@callmejobson
@callmejobson 11 месяцев назад
Great series I need a refresher for my notes Thank you! -Jobson
@KampaPlays
@KampaPlays 10 месяцев назад
Thanks so much, glad it helped!
@pustehuseynova8326
@pustehuseynova8326 Год назад
Very nice video as always👍🏻👍🏻. I have learned a lot of things with the help of your videos. My dream was always to be a good programmer. With your help I hope I will achieve my purpose.
@KampaPlays
@KampaPlays Год назад
Thank you!! I'm glad they are helpful. Keep at it, the best way to be a coder is to write code!! 😁
@TauwinKul
@TauwinKul 9 месяцев назад
Thanks for your videos!
@KampaPlays
@KampaPlays 9 месяцев назад
Glad to help, thank you for watching!
@peri.platypus
@peri.platypus 8 месяцев назад
new subscriber here
@KampaPlays
@KampaPlays 8 месяцев назад
Thank you!!
@christoflindner7335
@christoflindner7335 4 месяца назад
Hey, I'm so new to this channel, just needed some help in general with wpf, since im trying to develop a linrary for custom controls 😅... Thanks for all the help ... But gimme more 😂❤
@KampaPlays
@KampaPlays 3 месяца назад
Good luck on the library!! Hopefully I'll be starting back up soon, too.
@gogoback-cb6sz
@gogoback-cb6sz 2 месяца назад
the best tutorial!!!
@DavidDanosTech
@DavidDanosTech Год назад
Congratulations Excellent tutorial. 🔥🔥🔥🔥🔥🔥🔥🔥🔥
@KampaPlays
@KampaPlays Год назад
Thank you!!!
@jaimeandrescatano
@jaimeandrescatano 11 месяцев назад
Can't wait for the next one!!!!
@KampaPlays
@KampaPlays 11 месяцев назад
Thank you, hopefully I should be back at it soon!
@mertgulsen7284
@mertgulsen7284 4 месяца назад
Excellent tutorial
@KampaPlays
@KampaPlays 3 месяца назад
Thanks!
@HobTechTV
@HobTechTV 11 месяцев назад
you deserve more subs, keep up the good work!!!
@KampaPlays
@KampaPlays 11 месяцев назад
Thanks so much!!!
@ReallyUNeed
@ReallyUNeed Год назад
It's great u point small things as well which creates confusions, keep it up like this... When is the next video eagerly waiting. Hope Coming Soon ends Soon.
@KampaPlays
@KampaPlays Год назад
Thank you! I hope to get back to it in the next couple of weeks or so once work calms down.
@RaqiGirl
@RaqiGirl 5 месяцев назад
I have really enjoyed your C# WPF Tutorials. I feel like I've learned a great deal from them. I am wondering if you have, or can recommend, tutorials for accessing SQL databases? Thanx
@KampaPlays
@KampaPlays 5 месяцев назад
That was quick! So glad you enjoyed them. I don't have any video tutorial references on hand - I really want to do a series on databases when I have more time. Browsing around, I found this, it looks like it covers the important no-frills howtos of C# + MSSQLServer: zetcode.com/csharp/sqlserver/ I think learning this is most important, rather than starting with an ORM like entity framework that obfuscates how things happen. Many times a simple database application, especially a personal one, is easier to just implement yourself rather than take on the extra complexity. From there, if you are interested, you might want to check out additional tools/ORMs like: Dapper: www.learndapper.com/#what-does-dapper-do Entity Framework: learn.microsoft.com/en-us/visualstudio/data-tools/create-a-simple-data-application-with-wpf-and-entity-framework-6?view=vs-2022 If you are looking for a lighter-weight database option, SQLite [flat file, non-server] may interest you. sqldocs.org/sqlite/c-sharp-sqlite/
@atalayk9663
@atalayk9663 7 месяцев назад
congratz. good job
@KampaPlays
@KampaPlays 7 месяцев назад
Thanks!
@veczz2509
@veczz2509 3 месяца назад
Legend thanks
@pierrestcergues
@pierrestcergues 7 месяцев назад
The coming soon next episode is wanted! :-)
@guilhermebiolchi1179
@guilhermebiolchi1179 13 дней назад
Please continue with this series 😢
@isasayin3102
@isasayin3102 17 дней назад
Thanks for the good tutorial. I wonder how we could use the parameter object in CanExecute and Execute methods?
@shivaprasad7703
@shivaprasad7703 9 месяцев назад
Waiting For Multithreading....Please continue doing video's...
@paulino_acuna
@paulino_acuna 3 месяца назад
awesome !!
@KampaPlays
@KampaPlays 3 месяца назад
Thanks!!
@user-qq6qi1js6b
@user-qq6qi1js6b Год назад
Interesting video like the previous ones. Can you make a video on how to navigate between pages in wpf?
@KampaPlays
@KampaPlays Год назад
It is on my to-do list! thanks!
@fatemeh2222
@fatemeh2222 2 месяца назад
Please say that you're gonna be back with the series :)
@JMCiller
@JMCiller 9 месяцев назад
Hey @KampaPlays thank you so much for this tutorial. I hope you can get back to it because I saw in the comments that it is helping so much people around the globe. I already saw many tutorials on RU-vid and Udemy and I could not find anyone as good as yours. Congratulations for that. One suggestion that I have, will you continue with MVVM showing samples about passing data from one page to another page? and if you get back to that previous page, the data inserted remain? I could not find any tutorial explaining that yet on the internet and it will help me so much. Last question, I noticed trhat you always create WPF Windows and most people create from User Control. Whats the difference? Thank you so much master!
@KampaPlays
@KampaPlays 9 месяцев назад
Sorry for the delay.. really appreciate the thoughts! I will definitely make a deeper look with navigation and data passing/persistence. Many times it can be as easy as maintaining references to your active views' view models, and the data will be held in those objects, but it's close up on my todo list when i can get back into it. Usually for these tutorials I just create a single Window and put logic into it. Window comes with behaviors to start/close the application as well as minimize/maximize/etc. User Control is basically UI space with nothing extra, so its great for separating out pieces, creating reusable widgets, swapping panels, etc.
@janvokurka2401
@janvokurka2401 Год назад
Great tutorials. Are you planning on making a video on how to navigate between pages/UserControls/Windows and its differences using MVVM and Commands anytime in the near future? Would really appreciate someone to explain this in another way than hour long non-commmented recordings :-)
@KampaPlays
@KampaPlays Год назад
Thanks, yes navigation and swapping between views/viewmodels are both on my todo list!
@programwithdenis3643
@programwithdenis3643 10 месяцев назад
@@KampaPlays will be waiting
@balintmolnar9064
@balintmolnar9064 7 месяцев назад
Thanks
@KampaPlays
@KampaPlays 7 месяцев назад
Thank you, really appreciate that!!
@janjanlara2502
@janjanlara2502 10 месяцев назад
Wow plz don't stop this series specially WPF MVVM, can you make a content that create a project using C# WPF MVVM pattern?
@KampaPlays
@KampaPlays 10 месяцев назад
I'll be continuing the series, I will try to start from the ground up to create a whole project.
@janjanlara2502
@janjanlara2502 10 месяцев назад
@@KampaPlays thank you so much, well appreciated
@rmunhozdev
@rmunhozdev 2 месяца назад
Great. Where Can I find the sources of this playlist?
@mohanty_rahul
@mohanty_rahul 4 месяца назад
very nice video playlist is there any chance for more videos for WPF?😀
@KampaPlays
@KampaPlays 3 месяца назад
Thank you, hopefully soon!
@najlitarvan921
@najlitarvan921 2 месяца назад
could you do a tutorial on how can two user controls communicate between each other and dynamically replacing parts of the ui based on what is say selected in a tree view or datagrid
@khuebui7087
@khuebui7087 10 месяцев назад
thanks for sharing, can i ask a question, in MVVM where i can call API or logic
@KampaPlays
@KampaPlays 10 месяцев назад
You would call API/logic inside of the ViewModel itself. That way you can use the results/response to update your UI and your models. You may want to separate the bulk of that logic into another class to be called from the ViewModel if it makes sense to do so.
@BadyTheProgram
@BadyTheProgram Год назад
Nice tutorial series, I learned a lot. I am a beginner in WPF o maybe my question is basic: do you plan to make tutorial about how to add and remove elements/uer controls from grid or other elements like stackpanel? I thinnking about like miniatures appear in the windows explorer.
@KampaPlays
@KampaPlays Год назад
Thank you, I'm glad it was helpful. I can add this to my todo list!
@benstrahd3154
@benstrahd3154 Год назад
Great tutorial. Can you make a video for mvvm community toolkit as well?
@KampaPlays
@KampaPlays Год назад
Thank you. I'll add this to my list, but it may be some time before I get to covering any specific 3rd party packages.
@kevingenon5904
@kevingenon5904 11 месяцев назад
please make more!
@KampaPlays
@KampaPlays 11 месяцев назад
Will be back at it as soon as work calms down a bit!!
@kfpcraft531
@kfpcraft531 2 месяца назад
It's so sad that Kampa Plays did not make the multi-threading video. I would use that video.
@2206lars
@2206lars 2 месяца назад
Amazing tutorial!!! But can anyone tell me if / how i can pass augments (CommandParameter or simillar) to the Relay Command?
@2206lars
@2206lars 2 месяца назад
Got it :D In Viewmodel: public ICommand delIng { get { return new RelayCommand(param => deleteIng(param)); } } void deleteIng(object ing) { //Do sth }
@dariostromajer1625
@dariostromajer1625 Год назад
Great video as always. If there aren't any major downsides to it, I think I'll just go with implementing each command as a separate class since I have absolutely no clue how lambda expressions work or whatever that was you used...
@KampaPlays
@KampaPlays Год назад
Thanks! I would strongly recommend using the generic version of the RelayCommand class. It will keep you from ending up with hundreds of lines of duplicated code, and if changes ever need to be made, they can be done in a single place. Expression bodied members are a bit crazy looking at first, but they are an amazing tool in C# I and definitely think it's worth learning! learn.microsoft.com/en-us/dotnet/csharp/programming-guide/statements-expressions-operators/expression-bodied-members
@dariostromajer1625
@dariostromajer1625 Год назад
@@KampaPlays That's interesting because I saw this video: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-bYPU8X8f2xU.html (this is his conclusion) from a seemingly experienced guy, who is also making wpf tutorials. He talks about the pros and cons of creating a class for each command and he also presents an example in which using relay commands would actually result in duplicated code. So I got the impression that it doesn't really matter which way to do it... I'll definitely still look into expression bodied members though!
@KampaPlays
@KampaPlays Год назад
@@dariostromajer1625 Hey, that was a good watch, and a pretty clean way to do things. I wasn't trying to say it was wrong, but mostly that I would give it a go (especially with expression bodied members themselves) before you go with the other method. I've used both methods with success, but what I've noticed is with a team of people, things can get much muddier faster with command specific implementations, but as long as you follow a good standard and keep consistent I say do what you are comfortable with.
@evanmashack8242
@evanmashack8242 8 месяцев назад
Any suggestions on books or other resources to continue to learn WPF?
@KampaPlays
@KampaPlays 8 месяцев назад
My biggest suggestion would be to pick a personal/work project you want to complete and let necessity drive your learning using the Microsoft available resources. learn.microsoft.com/en-us/dotnet/desktop/wpf/controls is a good place to start, they have lots of information for each component including sample code and examples.
@onstargaming3168
@onstargaming3168 7 месяцев назад
Hey do you know How can we get wpf in macOS It is not showing wpf in it I want to know is there anything specific I have to do or there is alternative I am really into it and I have MacBook
@KampaPlays
@KampaPlays 6 месяцев назад
As far as I know, WPF is strictly Windows. There are several WPF-like alternatives that are cross platform though. Check out Avalonia UI. MAUI also is similar, in that it uses XAML, but Avalonia is much closer to native WPF.
@ilikewaffles3689
@ilikewaffles3689 Год назад
Every other video on the WPF playlist was crystal clear. This one was very confusing. Maybe it will be clearer if I look into what commands are in WPF controls. I understand expresion-bodied members, but don't understand the purpose of providing Action and Func to the Interface's methods.
@KampaPlays
@KampaPlays Год назад
Sorry for the confusion -- WPF bindings and commands are one of the more "black magic" things that are hard to see how they work. Those parameters are provided so you can make RelayCommand more generic. You can pass any function to serve as your command action, and any function to serve as your predicate (whether or not you can do that action). So for example, using a button, you can bind a RelayCommand, and provide a "DoThis()" and a "CanDoThis()", and it will handle things like disabling the button based on "CanDoThis()" to running "DoThis()" when the button is clicked. I hope this is helpful.
@ilikewaffles3689
@ilikewaffles3689 Год назад
@@KampaPlays yes I think I understand. What's the alternative? Do you create a new class with new methods for each button?
@samotrasin6
@samotrasin6 5 месяцев назад
please continue...
@user-vg1ft2qf5i
@user-vg1ft2qf5i Год назад
If I have a method that takes a parameter to perform a task based on the parameter, how would I include a CommandParameter to the command? Thanks for the great tutorial. It helps me a lot.
@dariostromajer1625
@dariostromajer1625 Год назад
Are you asking how you can pass something to the Execute method of your command? If so, you can set the property CommandParameter on your button in xaml. You can also do it in code-behind with yourButtonName.CommandParameter = something...
@KampaPlays
@KampaPlays Год назад
Thank you! Dario's answer is correct, and I will add these to my todo list, as it can be confusing!
@lukas6538
@lukas6538 2 месяца назад
Does this also work for events?
@vladimirruppel
@vladimirruppel 7 месяцев назад
Hello! Watched already all your videos about WPF and want to say thank you for the job you've done! Although in the end of the video you're telling that a video about threading is coming soon but this is the last video. What happened? :(
@KampaPlays
@KampaPlays 6 месяцев назад
Appreciate it. Yeaaaah, life happened. Lots of work and family things. I am planning to return as soon as I can with a continuation of the series and advanced topics, but I have to get past a few more hurdles first! Thanks for watching :)
@vladimirruppel
@vladimirruppel 6 месяцев назад
@@KampaPlays damn, hang in there!
@NightKnightMBB
@NightKnightMBB Год назад
Great tutorial! but I just want to know, if Is it possible and if so, how can I change the SelectedItem to SelectedItems so I could remove multiple rows at once. 😁
@KampaPlays
@KampaPlays Год назад
Thank you!! It is possible, but since you can't bind directly to SelectedItems, you have to use another way such as a CommandParameter or custom control. I will add this to my to-dos! This might help clear things up in the meantime: stackoverflow.com/questions/9880589/bind-to-selecteditems-from-datagrid-or-listbox-in-mvvm
@mdahm3d
@mdahm3d 21 день назад
thanks you It’s really helpful, could you please provide the source on github or any other site
@reyaadelkomy8046
@reyaadelkomy8046 Год назад
Can you make a tutorial for communicating between two viewmodels, create an n-tier solution structure and work with EF. Thanks a lot!
@KampaPlays
@KampaPlays Год назад
Will add it to my todo!
@reyaadelkomy8046
@reyaadelkomy8046 Год назад
@@KampaPlays Thanks a lot.
@israraziz387
@israraziz387 5 месяцев назад
More vedios on mvvm
@serred9452
@serred9452 Месяц назад
Honestly, this video is very engaging. Its a shame that its has been a year since your last video..
@niyazizaid7023
@niyazizaid7023 11 месяцев назад
Please teach how to handle different screen resolutions
@KampaPlays
@KampaPlays 11 месяцев назад
Many things in WPF "handle themselves" when it comes to resolution changes -- What are you interested in doing?
@rlvy
@rlvy Год назад
Can you make a tutorial on accessing data with EF Core on WPF ?
@KampaPlays
@KampaPlays Год назад
Will add to my list of to-dos.
@ninasharma1356
@ninasharma1356 11 месяцев назад
Please make a tutorial on inkcanvas with infinite drag/scroll. Thanks 🙏
@KampaPlays
@KampaPlays 10 месяцев назад
Will add to my todos!
@ninasharma1356
@ninasharma1356 10 месяцев назад
@@KampaPlays please do
@priyankaabbineni4231
@priyankaabbineni4231 Год назад
Can you pls do video on tree view dynamic binding pls…
@KampaPlays
@KampaPlays Год назад
This is on my todo list, thanks!
@ToastyB9
@ToastyB9 Год назад
Where is the code? If I am not finding any code with this video, it's a waste of time to follow your video.
@KampaPlays
@KampaPlays Год назад
I don't include code with these short, beginner level tutorials. This is to help the most people learn and retain the information. The best way to learn to code is to write code.
@talktodale
@talktodale Год назад
@@KampaPlays I have thirty years experience and just switched to WPF. I’d encourage you to include the code because people don’t have time to write code for these. I’m finding solutions elsewhere and now I look for code before viewing.
@KampaPlays
@KampaPlays Год назад
@@talktodale I appreciate the feedback and definitely understand your point (I don't watch tutorial videos myself, as its faster for me to just reference the documentation). I will absolutely include repos for more complex/lengthy topics, but my primary goal here is to help people learn, understand, and retain. I would highly recommend going straight to Microsoft learn.microsoft.com/en-us/dotnet/desktop/wpf/ and skip videos entirely if you are an experienced programmer, as it has a wealth of example code for everything you might need. Again, thanks for the feedback and best of luck to you.
@ToastyB9
@ToastyB9 26 дней назад
@@KampaPlays that would be fine but you don't say which version of .Net you are using and although it works with the older versions, it does not work with .NET 8.0
@delunzhou4080
@delunzhou4080 9 месяцев назад
Can It get a job in cina?
@KampaPlays
@KampaPlays 9 месяцев назад
With remote programming jobs being so available, I bet you could get work anywhere! :)
@volkangundogdu1008
@volkangundogdu1008 Год назад
Hi Kampa, may i contact you per email?
@KampaPlays
@KampaPlays Год назад
Sure -- kampaplays@gmail.com but honestly I don't check the mail as often as I check comments here!
@volkangundogdu1008
@volkangundogdu1008 Год назад
I d like to get professional support from you and i believe it wont take too much time from you. I already have an approach (basic solution) and would like to discuss you whether my solution is optional or acceptable. (I have a set of historical collection and i d like to filter based on filter text box (a string prompted by water watermark) i convert this string into column name and value pair and then filter this column by that value given by filter text box(ps. Orc filter control is used from wildgums)
Далее
C# WPF Tutorial #21 - Styles and ControlTemplates
12:53
За что я НЕНАВИЖУ ЛЕТО
00:59
Просмотров 160 тыс.
Все сезоны бравл пассов…!!!😨
00:59
The Basics of Data Binding in WPF
20:53
Просмотров 38 тыс.
WPF in C# with MVVM using Caliburn Micro
1:23:30
Просмотров 362 тыс.
C# WPF Tutorial #23 - Using ViewModels in MVVM
15:02
Просмотров 22 тыс.
Powerful Habits to make Games Quickly
35:58
Просмотров 6 тыс.
WPF INotifyPropertyChanged and Databinding
14:30
Просмотров 39 тыс.