Exemplo n.º 1
0
        public static void MapContent(RadioButtonHandler handler, RadioButton radioButton)
        {
            if (radioButton.ResolveControlTemplate() == null)
            {
                radioButton.ControlTemplate = RadioButton.DefaultTemplate;
            }

            RadioButtonHandler.MapContent(handler, radioButton);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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);
        }