public static void MapContent(RadioButtonHandler handler, RadioButton radioButton) { if (radioButton.ResolveControlTemplate() == null) { radioButton.ControlTemplate = RadioButton.DefaultTemplate; } RadioButtonHandler.MapContent(handler, radioButton); }
public static void MapContent(RadioButtonHandler handler, RadioButton radioButton) { if (radioButton.ResolveControlTemplate() != null) { handler.PlatformView.Style = UI.Xaml.Application.Current.Resources["RadioButtonControlStyle"] as UI.Xaml.Style; } else { handler.PlatformView.ClearValue(FrameworkElement.StyleProperty); } RadioButtonHandler.MapContent(handler, radioButton); }
public static void MapContent(RadioButtonHandler handler, RadioButton radioButton) { if (radioButton.ResolveControlTemplate() != null) { if (handler.PlatformView is ContentViewGroup vg && handler.MauiContext != null) { // Cleanup the old view when reused vg.RemoveAllViews(); if (handler.VirtualView.PresentedContent is IView view) { vg.AddView(view.ToPlatform(handler.MauiContext)); } } return; } RadioButtonHandler.MapContent(handler, radioButton); }