Тёмный

C# WPF Tutorial #23 - Using ViewModels in MVVM 

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

Diving into the implementation of MVVM with the creation of our first Model and VIewModel, setting our data context and using several types of Bindings to our View, as well as a few upgrades, tips and tricks!
Happy Coding!
Chapters:
0:00 Setup
1:58 Creating a Model (POCO)
3:01 Creating a ViewModel
7:40 ViewModel Base Class
8:54 View and Bindings
10:30 Seeding Data and Testing
11:40 DataGrid Custom Columns
13:24 Recap/Review
14:41 Next Up

Наука

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

 

12 июл 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 36   
@volkangundogdu1008
@volkangundogdu1008 Год назад
Thanks!
@KampaPlays
@KampaPlays Год назад
Thanks so much, really appreciate that!!!
@pierrestcergues
@pierrestcergues 7 месяцев назад
Your tutorials are a pure gift! thanks!
@KampaPlays
@KampaPlays 7 месяцев назад
Thank you!!
@user-qq6qi1js6b
@user-qq6qi1js6b Год назад
Great tutorial. I learned new features on WPF. Thanks.
@KampaPlays
@KampaPlays Год назад
Awesome, thank you!
@robinheyer708
@robinheyer708 Год назад
It's almost disappointing how straightforward this is after getting worked up about "the unknown" :P
@KampaPlays
@KampaPlays Год назад
🤣Yes!! So many times our worst enemy in programming is over-engineering and over-complication!
@rahulgoutham7102
@rahulgoutham7102 9 месяцев назад
Very well explained. Thanks a ton.
@KampaPlays
@KampaPlays 9 месяцев назад
Awesome! Glad to help.
@wookyumkim4669
@wookyumkim4669 Год назад
Finally!! I have reached to this video! 🤣🤣 I'm so glad that you are presenting this mvvm concept with datagrid example. 😊😊 Thank you so much Kampa! 😄😄
@KampaPlays
@KampaPlays Год назад
Finally made it here! :)
@user-zv9rk6hu1j
@user-zv9rk6hu1j Месяц назад
Thank you for the video!
@kojhkimo
@kojhkimo Год назад
Amazing!!
@KampaPlays
@KampaPlays Год назад
Thanks so much!
@Stars.Stripes.andVan
@Stars.Stripes.andVan Год назад
Great video as usual! I didn't know that we don't have to implement INotifyPropertyChanged for ObservableCollection Lol. Thanks for making me realize that my knowledge of WPF is still very limited.😆
@KampaPlays
@KampaPlays Год назад
I understand that, it's a great framework, but its not always 100% intuitive! 😂
@thushanshanilka3251
@thushanshanilka3251 Год назад
Great tutorial series. Only problem is having to wait too long for the next video.
@KampaPlays
@KampaPlays Год назад
Thanks so much! Maybe one day I'll have time to up the release tempo!
@semautomacao991
@semautomacao991 11 месяцев назад
Start with a tip😋
@mythmaker6155
@mythmaker6155 Год назад
Great tutorial. i finished all the video from playlist. can tell how many video left? and when you are going to upload again?
@KampaPlays
@KampaPlays Год назад
Thank you and thanks for watching! I'm not exactly sure, maybe 5-10? I'm trying to release 1 per week, but work is very busy right now, so occasionally I fall behind. Should be another coming out this week though.
@dakloafitz6347
@dakloafitz6347 Год назад
Uhh nice!! MVVM!! love it :D I just startet playing around with MVVM a few days ago. The only part i´m not getting is, how do i get data from one viewmodel to the other? So lets say the first view is the inventory view like you´ve just drawn, the second one is e.g. a details view for one specific item. So i need the have access to the same ObservableCollection as in the first view. Hope you´ll get to that soon :) Thanks for ur videos, they have helped me a lot :)
@KampaPlays
@KampaPlays Год назад
Thanks! So one easy way to do what you are asking is to create the second viewmodel in the first wherever you are opening your new window, and pass it to the new window itself. Something like: ViewModel1: void ShowDetails() vm2 = new DetailsVM(); view2 = new DetailsView(vm2) This way you can flow data (or references to data) down to your children/subcomponents from where they originate. Things stay encapsulated nicely this way rather than using globals or some other static method to pass the data around.
@vitalijgrabovan2061
@vitalijgrabovan2061 3 месяца назад
Hello Kampa, as always the best video about WPF that I have seen so far - and I have seen them alot !!! Any idea why intellisense is not recommending properties in the selection list when you are typing them in the XAML window ? I saw in some videos tha other people dont have this problem. I tired everything and cant get it working. Thx
@KampaPlays
@KampaPlays 2 месяца назад
Thanks so much! Sometimes the XAML designer gets hosed up for some reason - I have noticed this at times. Usually a clean/build or a VS restart will fix it. It also could not be giving you specific properties due to namespace/includes not being listed correctly or built. I hope it works for you!
@priyankaabbineni4231
@priyankaabbineni4231 Год назад
Pls do a video on treeview control in MVVm
@KampaPlays
@KampaPlays Год назад
Added it to my list.
@reyaadelkomy8046
@reyaadelkomy8046 Год назад
Really create a tutorial and create job.
@The1Wolfcast
@The1Wolfcast Месяц назад
Can't believe I struggled with understand MVVM in the past. I am more confused how every video in this playlist worked without error every time??!?!
@dariostromajer1625
@dariostromajer1625 Год назад
new video when??
@KampaPlays
@KampaPlays Год назад
Maybe about 10 minutes? 😁
@dariostromajer1625
@dariostromajer1625 Год назад
@@KampaPlays hell yeahh!!
Далее
C# WPF Tutorial #24 - Using RelayCommand in MVVM
9:41
WPF in C# with MVVM using Caliburn Micro
1:23:30
Просмотров 361 тыс.
Who Can Break Most Walls? Ep.2 | Brawl Stars
00:26
Просмотров 976 тыс.
The Basics of Data Binding in WPF
20:53
Просмотров 36 тыс.
Is LEARNING WPF still WORTH it in 2023?
10:59
Просмотров 42 тыс.
C# WPF Tutorial #21 - Styles and ControlTemplates
12:53
WPF Controls with MVVM: DataGrid
24:59
Просмотров 171 тыс.
[C#] WPF MVVM. Реализация
13:44
Просмотров 66 тыс.
ОБСЛУЖИЛИ САМЫЙ ГРЯЗНЫЙ ПК
1:00