Switches Radiobuttons
This commit is contained in:
@ -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
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user