WPF INotifyPropertyChanged and Databinding

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 ก.พ. 2025

ความคิดเห็น • 101

  • @_buffer
    @_buffer  3 ปีที่แล้ว +5

    There is now an official Discord server!
    discord.gg/2RNRx73aDE

    • @Mrowa378
      @Mrowa378 11 หลายเดือนก่อน

      Make as many useful recordings as possible, because I like them very much and keep it up (Greetings!) 🙂

  • @TalisBarbalho
    @TalisBarbalho 3 ปีที่แล้ว +4

    just found out this channel recently as I started to study wpf and c#.
    each video is like a gold mine.
    Thanks for sharing your knowledge and time

    • @_buffer
      @_buffer  3 ปีที่แล้ว

      Thank you so much! I appreciate you a lot! :-)

  • @gugomayora
    @gugomayora 3 ปีที่แล้ว +1

    I love how u r always updated with latest versions.

    • @_buffer
      @_buffer  3 ปีที่แล้ว

      Thank you! I try :-)

    • @gugomayora
      @gugomayora 3 ปีที่แล้ว +1

      @@_buffer may I ask u somehing please... did u studied a University carreer? how did u master C# and .NET development so deep?

    • @_buffer
      @_buffer  3 ปีที่แล้ว +1

      @@gugomayora Good question! It's a combination of both studies and lots of practice, I find learning by doing to be a great method to use in order to get better :-)

    • @gugomayora
      @gugomayora 3 ปีที่แล้ว

      @@_buffer Thank u very much buddy

  • @DyslexicAnaboko
    @DyslexicAnaboko 2 ปีที่แล้ว +1

    I can't thank you enough! I have been working on the same stupid problem for hours and you just pointed out what I was missing all this time. I have a three tier Tree View control so it's getting very involved. All I wanted to do was make the UI update when the 2nd tier's check box was toggled to update the 3rd tier's list of check boxes. Your rudimentary Select all / Deselect all. I implemented the INotifyPropertyChanged in one of my classes, but I didn't realize you had to do it in all affected view models. That was the part I was missing! So incredibly not obvious. Your explanation was perfect, thank you!

    • @_buffer
      @_buffer  2 ปีที่แล้ว

      I'm glad you found it useful! I hope the project goes well! :-)

  • @Ragnovlod
    @Ragnovlod 6 หลายเดือนก่อน +1

    This is a great tutorial. I appreciate how you talked about things that helps us follow along. You could do a short video on productivity - all those shortcuts you know and your speed at the keyboard - it really blows my mind. Thank you so much for putting this out here.

    • @_buffer
      @_buffer  6 หลายเดือนก่อน

      Thank you! And that's a really good idea, I'll write that down! :-)

  • @selmanalfaris3544
    @selmanalfaris3544 3 ปีที่แล้ว +7

    Waiting for more wpf design videos 🔥

    • @_buffer
      @_buffer  3 ปีที่แล้ว +5

      More on the way! Got a few lined up! :-)

  • @TheUltraBlender
    @TheUltraBlender 3 ปีที่แล้ว +4

    Man, you just continue to amaze me. With a lot of tutorials i feel like they don't give you enough info or even worse, way too much. Then i end up going down the rabbithole and getting frustrated because i understand even less.
    And then there's your stuff giving just enough information to use the explained topic effectively but also having a few points to hook on if you want to dive deeper.
    You really got a talent for teaching, thanks for sharing and wish you all the best.

    • @_buffer
      @_buffer  3 ปีที่แล้ว +1

      Wow! That means a lot! I really do appreciate that! It's stuff like this that makes keeps me motivated to make more and more videos! :-)

  • @WDGKuurama
    @WDGKuurama ปีที่แล้ว +1

    I was hardstuck on it, but then i found your video, thanks!

    • @_buffer
      @_buffer  ปีที่แล้ว

      You're most welcome! I'm glad you found it useful! :-)

  • @rays7834
    @rays7834 3 ปีที่แล้ว +3

    Please make tutorials more often, the are very useful

    • @_buffer
      @_buffer  3 ปีที่แล้ว +1

      More coming! Do you have any suggestions? What would you prefer to see?

    • @rays7834
      @rays7834 3 ปีที่แล้ว +1

      @@_buffer you have such a very cool playlist about how to programming on C#. Also it will be interesting to know more about Blazor and ASP.NET, thank you!
      *And maybe to make more examples, how to use something, maybe 2 more examples in this video of how and where I can use INPC.

    • @_buffer
      @_buffer  3 ปีที่แล้ว

      @@rays7834 Those are all great ideas! Thank you! :-)

  • @hassanhilaly8810
    @hassanhilaly8810 3 ปีที่แล้ว +1

    We always continue to learn from you .Thank you for sharing.

    • @_buffer
      @_buffer  3 ปีที่แล้ว

      You're most welcome! :-)

  • @foxspawn4551
    @foxspawn4551 3 ปีที่แล้ว +4

    This is great!
    Love the presentation style and pace.
    Subbing for more WPF / C# content!

    • @_buffer
      @_buffer  3 ปีที่แล้ว

      Thank you so much!! :-)

  • @rogerpence
    @rogerpence 3 ปีที่แล้ว +1

    Wow. Concise and full of sweet info! Great job.

    • @_buffer
      @_buffer  3 ปีที่แล้ว

      Thank you sir! :-)

  • @Lena1398
    @Lena1398 3 ปีที่แล้ว +2

    Great Video, very nicely explained and presented, thanks a lot! Your videos are my favourite WPF tutorials I found anywhere, it really helped me. Excited for all future content.

    • @_buffer
      @_buffer  3 ปีที่แล้ว +1

      Thank you so much! I really do appreciate it! And more content coming! :-)

  • @mikedyson3211
    @mikedyson3211 2 ปีที่แล้ว +1

    Absolutely First Class video. I recreated it step by step and now have a much better understanding of it. Many thanks!

    • @_buffer
      @_buffer  2 ปีที่แล้ว

      Thank you Mike! I'm glad you liked it and managed to follow along! :-)

  • @GachiBasster
    @GachiBasster 2 ปีที่แล้ว +1

    thanks for your videos, man. information in this video so useful for me

    • @_buffer
      @_buffer  2 ปีที่แล้ว

      You're welcome! I'm glad you found it useful!

  • @freestyle88
    @freestyle88 2 ปีที่แล้ว +1

    Man, I've been trying for hours to get one stupid checkbox to update in the UI when a boolean property changes in the background... Could not find a decent explanation of how to implement OnPropertyChanged until I found this -- that [CallerMemberName] trick is definitely needed there if checking a boolean rather than a string... and it works like a champ. Thank you!

    • @_buffer
      @_buffer  2 ปีที่แล้ว

      Heck yeah Matt! Well done! :-)

  • @zaxa.6044
    @zaxa.6044 3 ปีที่แล้ว +1

    Great tutorial thank you very much ! Clear theory explanation + great coding example !

  • @TheLIMAK8
    @TheLIMAK8 2 ปีที่แล้ว +1

    I love this guide, thank you dude

    • @_buffer
      @_buffer  2 ปีที่แล้ว

      You're most welcome!

  • @thanthiek2011
    @thanthiek2011 ปีที่แล้ว +1

    thank you that was the salvation after hours of googling and half-baked explanations

    • @_buffer
      @_buffer  ปีที่แล้ว

      You're most welcome!

  • @ContentPiano
    @ContentPiano 2 ปีที่แล้ว

    Thank you for the very clear explanation. Helped a lot!

  • @semidash
    @semidash 3 ปีที่แล้ว

    Thanks a million for the video!!! It really helped me to wrap my head aroud bindings.
    It would be great if you could do more videos on this topic

  • @johnquinn1853
    @johnquinn1853 2 ปีที่แล้ว +1

    Great video! Thanks!

    • @_buffer
      @_buffer  2 ปีที่แล้ว

      You're most welcome!

  • @RingOfFaia
    @RingOfFaia 3 ปีที่แล้ว +1

    11:24 Yes please make a video detailing how it works under the hood

  • @morek3766
    @morek3766 3 ปีที่แล้ว +5

    Great tutorial. Well explained. I was wondering when you’ll do a wpf tutorial that shows how to change pages with smooth transition without losing data for example, while also passing data to the new page. Thanks for sharing once more

    • @_buffer
      @_buffer  3 ปีที่แล้ว +2

      I'd love to do a video on that!It's just matter of keeping the datacontext :-)

    • @FiveNineO
      @FiveNineO 3 ปีที่แล้ว

      Great suggestion 👍

  • @juancarlosrodriguez4969
    @juancarlosrodriguez4969 ปีที่แล้ว

    Espectacular, se entendió bastante, no alcanzo a entender del todo la parte final, pero fue extremadamente instructivo y útil. Gracias por tu tiempo invertido en estos videos, espero puedas aplicar un ejemplo con el contenido de un combobox dentro de un datagrid 😁🤩

  • @GuildOfCalamity
    @GuildOfCalamity 3 ปีที่แล้ว +3

    Awesome video. More WPF please!
    Would love to see business logic code driven from the UI binding, e.g. click a button and a webpage downloads (the button would be disabled until the download completed).
    I think this would be a good example to show async thread operations in the background updating the UI in the foreground.

    • @_buffer
      @_buffer  3 ปีที่แล้ว +1

      That's a great idea! :-)

    • @GuildOfCalamity
      @GuildOfCalamity 3 ปีที่แล้ว

      @@_buffer You set a good speed during the tutorial and great editing; not too much detail, but not so vague that you don't know what's going on. Keep up the good work!

    • @_buffer
      @_buffer  3 ปีที่แล้ว +1

      @@GuildOfCalamity I really do appreciate it! Thank you so much! :-)

  • @rsetty33
    @rsetty33 2 ปีที่แล้ว

    Very nice explanation.. Thank you

  • @brandonkish3100
    @brandonkish3100 3 ปีที่แล้ว +1

    Dude this is freaking awesome! Could you do a video explaining the MVVM model? I have struggled with it for a long time. I don't fully understand the relationships between the models, and then how to interface it with the code behind.

  • @amitskhandelwal
    @amitskhandelwal 3 ปีที่แล้ว

    Best explanation ever

  • @omar_rayyan
    @omar_rayyan 2 ปีที่แล้ว +2

    you're a legend

    • @_buffer
      @_buffer  2 ปีที่แล้ว +1

      No, that's all you!

  • @Talking2Wall
    @Talking2Wall 2 ปีที่แล้ว

    You're the BEST!

  • @diederikdesoete9615
    @diederikdesoete9615 3 ปีที่แล้ว

    Great video, would love one that goes more in depth.

  • @anils469
    @anils469 2 ปีที่แล้ว

    Thanks Bro, Great video

  • @cr0lg8or56
    @cr0lg8or56 3 ปีที่แล้ว +3

    Thank for the Videos☻ and talk about taking informations from csv files and bringing them to a xaml DataGrid, pleaaase!1

    • @_buffer
      @_buffer  3 ปีที่แล้ว +1

      That can be arranged! :-)

  • @musabalriani550
    @musabalriani550 2 ปีที่แล้ว

    We'll be more than happy ,with MVVM Video

  • @botabbueu51
    @botabbueu51 2 ปีที่แล้ว

    Du är grym!

  • @tobiassjoholm9325
    @tobiassjoholm9325 2 ปีที่แล้ว +1

    Is possible to use composition instead of inheritance for the notify logic?

  • @kpbarker
    @kpbarker 2 ปีที่แล้ว

    Is it possible to bind dynamically? Creating labels dynamically along with a list of bool values. I'm trying to bind while looping through a for...loop to create a bunch of labels. The bound properties will be contained within a Dictionary.

  • @marpta6675
    @marpta6675 3 ปีที่แล้ว +1

    Great Video, but the problem is when we will have 20 property to change. Have you any idea for that?

  • @kylerbriskey372
    @kylerbriskey372 2 ปีที่แล้ว +3

    Another amazing video! You explained so many things I was confused about over the past year of learning this stuff. Also, the databinding was great to learn too and imma practice this technique often!
    I have a couple questions.
    Q1) If I have different classes in my project, how do set multiple DataContexts. Like If I had PersonModel and AnimalModel in 2 different columns of a grid.
    Q2) That Debug.WriteLine() was new to me bug very cool. Does this only work in Debug mode? but once I build a release of my app, will that code not slow anything down, or do I have to go manually remove it from the code?

    • @_buffer
      @_buffer  2 ปีที่แล้ว +2

      Thank you! I'm glad you found it informative! And in terms of setting multiple datacontexts for one class, that's not really recommended, if you're tryint to get data from a different ViewModel that would be bad architecture and I would suggest creating a service that both ViewModels could receive the same type of data from. This could be registered as a service using Dependency Injection for instance, which I recently made a video on.
      And as for the second question, that's correct, if you wanted the same functionality but when in release mode you could use `Trace.WriteLine`. :-)

    • @kylerbriskey372
      @kylerbriskey372 2 ปีที่แล้ว +1

      @@_buffer Okay great. I don't know the proper way to architect projects, but I'm slowly learning.
      Thank you

    • @_buffer
      @_buffer  2 ปีที่แล้ว +1

      @@kylerbriskey372 One day at a time :-)

  • @cosmingugoasa5949
    @cosmingugoasa5949 2 ปีที่แล้ว

    Maaaann almost perfect video 😭 how would this setup change if I'm using a view model between the model and the view ??
    The viewmodel would implement the INotify[...] but how does the link from the model to the view model work?
    Example : I crate a list of persons, I use this list to create the Observable Collection list, then one of the person changes ages (via business logic in the model class) is this change reflected to the ViewModel property to update the ui?

  • @antoinemoineau1037
    @antoinemoineau1037 3 ปีที่แล้ว +1

    Thank you for this content !
    The thing I can't wrap my head around is that binding doesn't seem to follow the traditional "The class is the blueprint and then you instantiate tangible objects and use those objects to do things". Here it looks like we are working directly with the blueprint. Is the object automatically instantiated by the UI ? How do you handle having multiple objects of the same class ? And how do you bind the same object to different places in the UI (for example a parameters view where you can modify settings on an object that is currently displayed in another view in the UI).

    • @_buffer
      @_buffer  3 ปีที่แล้ว

      Great question! Feel free to join the Discord server! It's a lot easier to explain it over there :-)

    • @antoinemoineau1037
      @antoinemoineau1037 3 ปีที่แล้ว

      @@_buffer Sure ! After posting I actually thought "maybe that would be best asked on the discord server". I joined, I'll ask again there.
      Edit : Btw, thank you for answering so fast ! ^^

  • @amitskhandelwal
    @amitskhandelwal 3 ปีที่แล้ว +1

    Please create one video on end to end application development in wpf c# and sql database. presently no such video like such on you tube

  • @YBXtreminal
    @YBXtreminal 3 ปีที่แล้ว +3

    Please do about input validation in TextBox

    • @_buffer
      @_buffer  3 ปีที่แล้ว +1

      Good idea! :-)

    • @YBXtreminal
      @YBXtreminal 3 ปีที่แล้ว +2

      @@_buffer great video, nice to see you again, you have been missed

  • @skeych
    @skeych 3 ปีที่แล้ว +1

    Simple good video

    • @_buffer
      @_buffer  3 ปีที่แล้ว

      Thank you! I really do appreciate that :-)

    • @skeych
      @skeych 3 ปีที่แล้ว +1

      @@_buffer , np. I have question. I use MVVM, and want to create my own UserControl in code-behind. I make List property, and when in ctor i do this: MyProperty = new List(){ new MyViewModel() { TextProp = "my text" } } - my UserControl will created, but "my text" isn't displayed.

    • @_buffer
      @_buffer  3 ปีที่แล้ว

      @@skeych Do you use Discord?

    • @skeych
      @skeych 3 ปีที่แล้ว

      @@_buffer yeap

    • @skeych
      @skeych 3 ปีที่แล้ว

      @@_buffer if you have discord srverv, i can connect

  • @enricoroselino7557
    @enricoroselino7557 2 ปีที่แล้ว

    .........this should also work in xamarin right ?

  • @FarooqAhmad-lr1fx
    @FarooqAhmad-lr1fx 2 ปีที่แล้ว

    Nice toturial. but how we can save it further?

  • @haku5957
    @haku5957 2 ปีที่แล้ว +1

    Please comeback with MVVM bro

    • @_buffer
      @_buffer  2 ปีที่แล้ว

      New MVVM video is being uploaded right now :-)

    • @haku5957
      @haku5957 2 ปีที่แล้ว +1

      @@_buffer i dont see it :(

    • @_buffer
      @_buffer  2 ปีที่แล้ว +1

      @@haku5957 It's currently processing, it'll be up soon! Feel free to join the Discord meanwhile, I'll post a notification on there when it's up!

    • @_buffer
      @_buffer  2 ปีที่แล้ว

      @@haku5957 It's up now :-)

  • @notanenglishperson9865
    @notanenglishperson9865 3 ปีที่แล้ว +2

    Lol, he's using Windows 11

    • @_buffer
      @_buffer  3 ปีที่แล้ว

      I sure am :-)

  • @thomasaminer
    @thomasaminer 8 หลายเดือนก่อน +1

    Thank you for the video!

    • @_buffer
      @_buffer  8 หลายเดือนก่อน

      You're most welcome! Thanks for the comment :-)