WeakReferenceMessenger is a .NET Community Toolkit messaging component that delivers messages through weak references. In a .NET MAUI app, it can notify a CollectionView when the application theme changes so the view refreshes. section 10.3.2
Refreshing a themed report
Use WeakReferenceMessenger to tell the report page’s CollectionView to refresh after a theme change. This keeps the multiplatform report display synchronized across Android, iOS, and Windows layouts. section 10.3.2
Choose the current messaging component rather than the deprecated alternative:
- Use WeakReferenceMessenger in new .NET MAUI applications. section 10.3.2
- Avoid Xamarin.Forms MessagingCenter because it is deprecated and scheduled for removal in .NET 8. section 10.3.2
