static void UpdateContent(IRadioButtonHandler handler) { _ = handler.PlatformView ?? throw new InvalidOperationException($"{nameof(PlatformView)} should have been set by base class."); _ = handler.VirtualView ?? throw new InvalidOperationException($"{nameof(VirtualView)} should have been set by base class."); _ = handler.MauiContext ?? throw new InvalidOperationException($"{nameof(MauiContext)} should have been set by base class."); // Cleanup the old view when reused handler.PlatformView.ClearSubviews(); if (handler.VirtualView.PresentedContent is IView view) { handler.PlatformView.AddSubview(view.ToPlatform(handler.MauiContext)); } }
public static void MapIsChecked(IRadioButtonHandler handler, IRadioButton radioButton) { handler.PlatformView?.UpdateIsChecked(radioButton); }
public static void MapCornerRadius(IRadioButtonHandler handler, IRadioButton radioButton) => handler.PlatformView?.UpdateCornerRadius(radioButton);
public static void MapContent(IRadioButtonHandler handler, IContentView page) { UpdateContent(handler); }
public static void MapCornerRadius(IRadioButtonHandler handler, IRadioButton radioButton) { }
public static void MapStrokeColor(IRadioButtonHandler handler, IRadioButton radioButton) { }
public static void MapCharacterSpacing(IRadioButtonHandler handler, ITextStyle textStyle) { }
public static void MapContent(IRadioButtonHandler handler, IRadioButton radioButton) { }
public static void MapCornerRadius(IRadioButtonHandler handler, IRadioButton radioButton) { GetPlatformRadioButton(handler)?.UpdateCornerRadius(radioButton); }
public static void MapStrokeThickness(IRadioButtonHandler handler, IRadioButton radioButton) { GetPlatformRadioButton(handler)?.UpdateStrokeThickness(radioButton); }
public static void MapFont(IRadioButtonHandler handler, ITextStyle textStyle) { var fontManager = handler.GetRequiredService <IFontManager>(); GetPlatformRadioButton(handler)?.UpdateFont(textStyle, fontManager); }
public static void MapCharacterSpacing(IRadioButtonHandler handler, ITextStyle textStyle) { GetPlatformRadioButton(handler)?.UpdateCharacterSpacing(textStyle); }
public static void MapTextColor(IRadioButtonHandler handler, ITextStyle textStyle) { GetPlatformRadioButton(handler)?.UpdateTextColor(textStyle); }
public static void MapIsChecked(IRadioButtonHandler handler, IRadioButton radioButton) { GetPlatformRadioButton(handler)?.UpdateIsChecked(radioButton); }
public static void MapBackground(IRadioButtonHandler handler, IRadioButton radioButton) { GetPlatformRadioButton(handler)?.UpdateBackground(radioButton); }
public static void MapTextColor(IRadioButtonHandler handler, ITextStyle textStyle) { handler.PlatformView?.UpdateTextColor(textStyle); }
public static void MapIsChecked(IRadioButtonHandler handler, IRadioButton radioButton) { }
static AppCompatRadioButton?GetPlatformRadioButton(IRadioButtonHandler handler) => handler.PlatformView as AppCompatRadioButton;
public static void MapTextColor(IRadioButtonHandler handler, ITextStyle textStyle) { }
public static void MapBackground(IRadioButtonHandler handler, IRadioButton radioButton) { handler.PlatformView?.UpdateBackground(radioButton); }
public static void MapFont(IRadioButtonHandler handler, ITextStyle textStyle) { }
public static void MapCharacterSpacing(IRadioButtonHandler handler, ITextStyle textStyle) => handler.PlatformView?.UpdateCharacterSpacing(textStyle);
public static void MapStrokeThickness(IRadioButtonHandler handler, IRadioButton radioButton) { }
public static void MapFont(IRadioButtonHandler handler, ITextStyle button) { var fontManager = handler.GetRequiredService <IFontManager>(); handler.PlatformView?.UpdateFont(button, fontManager); }
public static void MapBackground(IRadioButtonHandler handler, IRadioButton radioButton) { }
public static void MapStrokeThickness(IRadioButtonHandler handler, IRadioButton radioButton) => handler.PlatformView?.UpdateStrokeThickness(radioButton);