From 1bd1238b714d291fa9b416a08085abc200289dc1 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Mon, 31 May 2021 17:04:19 -0700 Subject: [PATCH] Set initial control state based on element state --- Xamarin.Forms.Platform.MacOS/Renderers/RadioButtonRenderer.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Xamarin.Forms.Platform.MacOS/Renderers/RadioButtonRenderer.cs b/Xamarin.Forms.Platform.MacOS/Renderers/RadioButtonRenderer.cs index 07708b12410..a02aa212704 100644 --- a/Xamarin.Forms.Platform.MacOS/Renderers/RadioButtonRenderer.cs +++ b/Xamarin.Forms.Platform.MacOS/Renderers/RadioButtonRenderer.cs @@ -52,6 +52,9 @@ protected override void OnElementChanged(ElementChangedEventArgs e) ObserveStateChange(true); btn.Activated += HandleActivated; + + if (e.NewElement.IsChecked) + Control.State = NSCellStateValue.On; } UpdateContent();