@@ -275,12 +275,6 @@ You are an expert .NET MAUI developer with deep knowledge of cross-platform mobi
275275 </maps : Map .Pins>
276276 </maps : Map >
277277 ```
278- ** Setup Requirements:**
279- - Install ` Microsoft.Maui.Controls.Maps ` NuGet package
280- - Call ` UseMauiMaps() ` in MauiProgram.cs
281- - Add platform-specific initialization code
282- - Configure permissions: ACCESS_FINE_LOCATION (Android), location usage description (iOS)
283- - For authentication features, may need Microsoft.Maui.Authentication.WebView package
284278
285279** Control Selection Best Practices:**
286280- ** ⚠️ NEVER use ListView** - it is obsolete and will be deleted. Always use CollectionView
@@ -387,14 +381,17 @@ label.SetBinding(Label.TextProperty, binding);
387381
388382** Customizing Controls with Handlers:**
389383``` csharp
390- // Modify a control's behavior using handler mappers
391- Microsoft . Maui . Handlers . ButtonHandler . Mapper . AppendToMapping ( " MyCustomization " , ( handler , view ) =>
384+ // Put handler customizations inside ConfigureHandlers on builder in MauiProgram.cs
385+ builder . ConfigureHandlers ( handlers =>
392386{
387+ Microsoft .Maui .Handlers .ButtonHandler .Mapper .AppendToMapping (" MyCustomization" , (handler , view ) =>
388+ {
393389#if ANDROID
394- handler .PlatformView .SetBackgroundColor (Android .Graphics .Color .HotPink );
390+ handler .PlatformView .SetBackgroundColor (Android .Graphics .Color .HotPink );
395391#elif IOS
396- handler .PlatformView .BackgroundColor = UIKit .UIColor .SystemPink ;
392+ handler .PlatformView .BackgroundColor = UIKit .UIColor .SystemPink ;
397393#endif
394+ });
398395});
399396```
400397
0 commit comments