diff --git a/Xamarin.Forms.Controls/CoreGalleryPages/RadioButtonCoreGalleryPage.cs b/Xamarin.Forms.Controls/CoreGalleryPages/RadioButtonCoreGalleryPage.cs index 3841effea19..38cb8787062 100644 --- a/Xamarin.Forms.Controls/CoreGalleryPages/RadioButtonCoreGalleryPage.cs +++ b/Xamarin.Forms.Controls/CoreGalleryPages/RadioButtonCoreGalleryPage.cs @@ -105,23 +105,23 @@ protected override void Build(StackLayout stackLayout) var isCheckedContainer = new ValueViewContainer(Test.RadioButton.IsChecked, new RadioButton() { IsChecked = true, HorizontalOptions = LayoutOptions.Start }, "IsChecked", value => value.ToString()); - var checkedVisualState = new VisualState { Name = "IsChecked" }; - checkedVisualState.Setters.Add(new Setter { Property = RadioButton.ButtonSourceProperty, Value = "rb_checked" }); + //var checkedVisualState = new VisualState { Name = "IsChecked" }; + //checkedVisualState.Setters.Add(new Setter { Property = RadioButton.ButtonSourceProperty, Value = "rb_checked" }); - var group = new VisualStateGroup(); - group.States.Add(checkedVisualState); + //var group = new VisualStateGroup(); + //group.States.Add(checkedVisualState); - var normalVisualState = new VisualState{ Name = "Normal" }; - normalVisualState.Setters.Add(new Setter { Property = RadioButton.ButtonSourceProperty, Value = "rb_unchecked" }); - group.States.Add(normalVisualState); + //var normalVisualState = new VisualState{ Name = "Normal" }; + //normalVisualState.Setters.Add(new Setter { Property = RadioButton.ButtonSourceProperty, Value = "rb_unchecked" }); + //group.States.Add(normalVisualState); - var groupList = new VisualStateGroupList(); - groupList.Add(group); + //var groupList = new VisualStateGroupList(); + //groupList.Add(group); - var rbStateManaged = new RadioButton() { HorizontalOptions = LayoutOptions.Start }; - VisualStateManager.SetVisualStateGroups(rbStateManaged, groupList); + //var rbStateManaged = new RadioButton() { HorizontalOptions = LayoutOptions.Start }; + //VisualStateManager.SetVisualStateGroups(rbStateManaged, groupList); - var stateManagedContainer = new ValueViewContainer(Test.RadioButton.ButtonSource, rbStateManaged, "IsChecked", value => value.ToString()); + //var stateManagedContainer = new ValueViewContainer(Test.RadioButton.ButtonSource, rbStateManaged, "IsChecked", value => value.ToString()); Add(borderButtonContainer); Add(borderRadiusContainer); @@ -134,7 +134,7 @@ protected override void Build(StackLayout stackLayout) Add(textColorContainer); Add(paddingContainer); Add(isCheckedContainer); - Add(stateManagedContainer); + //Add(stateManagedContainer); } } } diff --git a/Xamarin.Forms.Core/RadioButton.cs b/Xamarin.Forms.Core/RadioButton.cs index 9499316af19..76e050a8266 100644 --- a/Xamarin.Forms.Core/RadioButton.cs +++ b/Xamarin.Forms.Core/RadioButton.cs @@ -20,8 +20,9 @@ public class RadioButton : Button, IElementConfiguration public static readonly BindableProperty GroupNameProperty = BindableProperty.Create( nameof(GroupName), typeof(string), typeof(RadioButton), null, propertyChanged: (b, o, n) => ((RadioButton)b).OnGroupNamePropertyChanged((string)o, (string)n)); - public static readonly BindableProperty ButtonSourceProperty = BindableProperty.Create( - nameof(ButtonSource), typeof(ImageSource), typeof(RadioButton), null); + // TODO Needs implementations beyond Android + //public static readonly BindableProperty ButtonSourceProperty = BindableProperty.Create( + // nameof(ButtonSource), typeof(ImageSource), typeof(RadioButton), null); public event EventHandler CheckedChanged; @@ -37,11 +38,12 @@ public string GroupName set { SetValue(GroupNameProperty, value); } } - public ImageSource ButtonSource - { - get { return (ImageSource)GetValue(ButtonSourceProperty); } - set { SetValue(ButtonSourceProperty, value); } - } + // TODO Needs implementations beyond Android + //public ImageSource ButtonSource + //{ + // get { return (ImageSource)GetValue(ButtonSourceProperty); } + // set { SetValue(ButtonSourceProperty, value); } + //} public RadioButton() { diff --git a/Xamarin.Forms.Platform.Android/AppCompat/RadioButtonRenderer.cs b/Xamarin.Forms.Platform.Android/AppCompat/RadioButtonRenderer.cs index 5a032f98306..62a38a3f123 100644 --- a/Xamarin.Forms.Platform.Android/AppCompat/RadioButtonRenderer.cs +++ b/Xamarin.Forms.Platform.Android/AppCompat/RadioButtonRenderer.cs @@ -211,7 +211,7 @@ protected virtual void OnElementChanged(ElementChangedEventArgs