How to handle WPF control focus with MVVM in C#

Поделиться
HTML-код
  • Опубликовано: 30 янв 2025
  • НаукаНаука

Комментарии • 20

  • @mrdiv8418
    @mrdiv8418 8 лет назад +2

    Big thanks! I am happy to see that channel is active again!

  • @AntonioGomez-qh2fe
    @AntonioGomez-qh2fe 3 года назад +1

    I am getting the feel for MVVM from you. Much appreciated.

  • @TheRyanFellow
    @TheRyanFellow 8 лет назад +2

    Very happy that new stuff is coming. Keep it up!

  • @zarangel
    @zarangel 5 лет назад

    finally after a week trying to figure this out, I made it work on my Project, this aproche only Works when you bind your VwModel trough the code behind in your view and I had all mi VwModels Binded through the XAML. so the event handler could never find the subscriber in the code behind, and dont remember if you mention that in your video, learnd the hard way. Love your Channel!!!!!! hope to see new content soon on MVVM, haven had time to see your Enterprise development series wich im sure ill learn a ton.

    • @AntonioGomez-qh2fe
      @AntonioGomez-qh2fe 3 года назад

      Viewmodel injection rather xaml is the way to go. You can even make the viewmodel a dependency property.

  • @garycheang8091
    @garycheang8091 5 лет назад

    work perfectly! much better than official solution lol.

  • @dosdeviant
    @dosdeviant 8 лет назад +1

    Great stuff!

  • @hazemelamir2083
    @hazemelamir2083 5 лет назад

    fantastic
    many thanks for your big effort

  • @stepan7396
    @stepan7396 8 лет назад +1

    Thanks for video !!!!

  • @ReviewCantina
    @ReviewCantina 2 года назад

    The awesome thing is I was able to get this to work with 2022 Dot net Maui MVVM with only a few changes. Funny how five years later its still relevent.

  • @handypda
    @handypda 2 года назад

    Hi thanks for the demo however appears to me there is a lot of code behind going on I believe in my humble opinion, a much more neater and cleaner approach would be using attached property which is testable without ANY GUI intervention, like the one that has been demonstrated here! Cheers

  • @waqar3115
    @waqar3115 6 лет назад

    hey Thanks You saved my day :-)

  • @quantomic1106
    @quantomic1106 5 лет назад

    I'm getting System NullRefeernceException: 'Object reference not set to an instance of an object.'
    for focus.FocusRequested += OnFocusResquested;