XAML Data Binding and MVVM Basics (.NET MAUI, WPF, UWP, Xamarin.Forms)

preview_player
Показать описание
Today, we attempt to fix up some code that was submitted by a viewer. They were having issues with some data binding in their XAML application and sent me some source code to look at. We diagnose the application to understand what is going wrong with the application including commands, two-way data binding, and some best practices to bind to objects.

Links:

Join this channel to get access to perks:

Follow:

Chapters:
00:00 - Overview of MVVM
01:50 - Binding Overview and Compiled Bindings
04:00 - Command overview & static issues
06:10 - Two-way databinding
09:00 - INotifyPropertyChanged
13:45 - Enhancing databinding to objects
18:00 - Wrap-up

Disclaimer: This channel, videos, and streams are created in my spare time and are a product of me... James Montemagno! They are NOT officially affiliated or endorsed by Microsoft (my employer) in any way. Opinions and views are my own.

My Setup:

#xaml #databinding #dotnetmaui
Рекомендации по теме
Комментарии
Автор

Fantastic idea for new videos! Data binding can definitely be a little confusing at first. But seeing the pro fix common errors is infinitely helpful to say the least. Much appreciated James!

waynepeters
Автор

Thanks James, a very very simple explanation that unravels the whole binding thing for those of us just starting out with xaml binding.

enzodiaz
Автор

I wish that we had this video back in the day when I learned XAML the first time. Good explanation and examples for beginners!

lnagy
Автор

You're awesome James, I hope your channel grows to the behemoth it deserves.

rory
Автор

One tip from my side:

VS light bulb suggestions are enabled in XAML. So if you are looking to import some namespaces in your XAML, you can just write the name of the class and press Ctrl + . (control and dot). That will suggest you to import proper namespace into your XAML directly. Very useful for providing x:DataType for the DataTemplate and DataContext.

bkaankose
Автор

Good Job on this. Really easy explained on how it works. A lot videos go in deep explaining and losing the simpicity. Thanks :)

matomarkovic
Автор

Definitely helpful, this is the main issue that I was having that was unclear in the Microsoft documentation.

WolfRose
Автор

Amazing video!!! Straight to the point and most importantly simply explained. Could you please cover the Backgrounding subject like Long-Running-Tasks for both IOs and Android.

giourikilinkaridis
Автор

Thank you very much James, it was super helpful. I learnt alot and noted my mistakes. I'm very new to Xamarin and all so I still run into alot of problems in my code. Yea, I was trying to send it to a database and it ran successfully. Thanks a lot!

xixixiaojie
Автор

Thanks James,
someone of our colleagues was asking for the same topic 2 days ago on Twitch. 👍

Tamer_Ali
Автор

Great video, i just learned something new !

aboubacar.traore
Автор

always waiting for your videos and always gets to learn new things. thanks james. and thank you again, for best quality practices and showing what not to do !

please tell us as well. where can we send our code.

FaheemRasheed
Автор

Every day I learned something new from James ❤️

ezzaldeen
Автор

Great video! Would like to see you do a deep dive on RelativeSource AncestorType and RelativeSource AncestorLevel.

GuildOfCalamity
Автор

Nice.. we should focus more on the basics and common mistakes!

David-qzrd
Автор

Hi James! You are exposing the Model to the View. You're breaking the MVVM principles. Thanks for your videos!

hwod
Автор

I'm just here to say how much I appreciate the pachinko machine!

microdesigns
Автор

Muito interessante, aprendo "English" e programação ao mesmo tempo. I'm from Brasil.

rogerio
Автор

Another awesome video. I would love for you to do a video on the proper way to handle secrets for open source apps and setting those secrets during deployment to the AppStore/GooglePlay using AppCenter.

BinaryNexus
Автор

Cool video. Can you do a video showing how to handle environment configurations in Xamarin/Maui. Include things like how to substitute in the plist and manifest, plus a recommended way to manage api calls. Been doing Xamarin for a few years and this seems to be absent from the documentation.

joshlueck