Sometimes you need to pass pieces of data to and from different parts of your application. This may be for communication between viewmodels or perhaps from your app startup class passing important information. With the .NET Community Toolkit you have a simple cross-platform way of sending and receiving messages no matter what type of app your are building. You can use it with .NET MAUI, WinUI, WPF, WinForms, ASP.NET Core, or just about any other .NET application!
Toolkit Release Blog - devblogs.microsoft.com/dotnet...
Documentation - docs.microsoft.com/dotnet/com...
Community Toolkit on GitHub - github.com/CommunityToolkit/d...
Sample Code: github.com/jamesmontemagno/To...
Join this channel to get access to perks:
/ @jamesmontemagno
👕 Buy some swag! - jamesmontemagno.myspreadshop....
☕️ Buy me a coffee - www.buymeacoffee.com/jamesmon...
Follow:
👨💻 GitHub: github.com/jamesmontemagno
🦜 Twitter: / jamesmontemagno
📄 Website: www.montemagno.com
📰 Newsletter: newsletter.montemagno.com/
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.
What is on my hat? It is the CLE clothing logo because I am from Cleveland! Checkout their awesome CLE merch: cleclothingco.myshopify.com/
What is that art on my wall? It is an original piece from the French street artist Gregos of La Butte Montmartre: / bcez1onhiqx
Chapters:
00:00 - Why you need a messenger for apps
01:30 - App and code overview
03:40 - Adding CommunityToolkit.Mvvm
04:00 - Creating a message to send
06:05 - Subscribing to messages
10:00 - Sending messages
13:00 - Cleaner implementation with IRecipient
15:05 - Wrap-up
My Setup:
📷 Canon M50 Mark II - amzn.to/3P8R7lp
💡 Nanoleaf Elements Lights - amzn.to/3umwJVW
🎙 Blue Spark Microphone - amzn.to/3qgtYkq
🎙 Blue Pop Filter - amzn.to/3jEWM3r
🤳 Rode Microphone Arm - amzn.to/2Z68AlE
🎧 Sony MDR7306 Headphones - amzn.to/372jxta
📲 Stream Deck - amzn.to/373Uk1n
📹 Elgato Cam Link - amzn.to/3a9eGbh
📷 GoPro Hero - amzn.to/374lm90
🖱 MX Master 2S Mouse - amzn.to/3d7J2gj
⌨️ Tecware Phantom Keyboard - amzn.to/3aUP4y9
#dotnet #dotnetmaui #aspnetcore
Негізгі бет Ғылым және технология A Better Pub/Sub Messenger for .NET Applications with WeakReferenceMessenger
Пікірлер: 112