Switches Radiobuttons

This commit is contained in:
2025-08-18 08:35:23 +02:00
parent ebbea4c1d4
commit e50f9c25b7
2 changed files with 40 additions and 3 deletions

View File

@ -21,6 +21,7 @@ namespace AdventureWorks.MAUI
#if WINDOWS
SetWindowOptions(builder);
SetWindowHandlers();
#endif
#if DEBUG
@ -53,5 +54,20 @@ namespace AdventureWorks.MAUI
});
}
#endif
#if WINDOWS
public static void SetWindowHandlers()
{
// Customize the Switch control for Windows
Microsoft.Maui.Handlers.SwitchHandler.Mapper
.AppendToMapping("Custom", (h,v) =>
{
h.PlatformView.OffContent = "No";
h.PlatformView.OnContent = "Yes";
h.PlatformView.MinWidth = 0;
});
}
#endif
}
}