Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Commit 303e01d

Browse files
committed
First round of feedback
1 parent 710d728 commit 303e01d

File tree

6 files changed

+8
-9
lines changed

6 files changed

+8
-9
lines changed

Xamarin.Forms.Core/RadioButton.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
namespace Xamarin.Forms
77
{
88
[RenderWith(typeof(_RadioButtonRenderer))]
9-
public partial class RadioButton : Button, IElementConfiguration<RadioButton>
9+
public class RadioButton : Button, IElementConfiguration<RadioButton>
1010
{
1111
readonly Lazy<PlatformConfigurationRegistry<RadioButton>> _platformConfigurationRegistry;
1212

@@ -15,7 +15,7 @@ public partial class RadioButton : Button, IElementConfiguration<RadioButton>
1515
public const string IsCheckedVisualState = "IsChecked";
1616

1717
public static readonly BindableProperty IsCheckedProperty = BindableProperty.Create(
18-
nameof(IsChecked), typeof(bool), typeof(RadioButton), false, propertyChanged: (b, o, n) => ((RadioButton)b).OnIsCheckedPropertyChanged((bool)n));
18+
nameof(IsChecked), typeof(bool), typeof(RadioButton), false, propertyChanged: (b, o, n) => ((RadioButton)b).OnIsCheckedPropertyChanged((bool)n), defaultBindingMode: BindingMode.TwoWay);
1919

2020
public static readonly BindableProperty GroupNameProperty = BindableProperty.Create(
2121
nameof(GroupName), typeof(string), typeof(RadioButton), null, propertyChanged: (b, o, n) => ((RadioButton)b).OnGroupNamePropertyChanged((string)o, (string)n));

Xamarin.Forms.Platform.Android/FastRenderers/ButtonRenderer.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
using AView = Android.Views.View;
1313
using AButton = Android.Widget.Button;
1414

15-
namespace Xamarin.Forms.Platform.Android.FastRenderers
15+
namespace Xamarin.Forms.Platform.Android.FastRenderers
1616
{
1717
public class ButtonRenderer : AppCompatButton,
1818
IBorderVisualElementRenderer, IButtonLayoutRenderer, IVisualElementRenderer, IViewRenderer, ITabStop,

Xamarin.Forms.Platform.UAP/FormsRadioButton.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,8 @@ void UpdateBackgroundColor()
7070

7171
void UpdateBorderRadius()
7272
{
73-
7473
if (_contentPresenter != null)
7574
_contentPresenter.CornerRadius = new Windows.UI.Xaml.CornerRadius(BorderRadius);
7675
}
7776
}
78-
}
77+
}

Xamarin.Forms.Platform.iOS/Renderers/RadioButonCALayer.cs renamed to Xamarin.Forms.Platform.iOS/Renderers/RadioButtonCALayer.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace Xamarin.Forms.Platform.iOS
66
{
7-
public class RadioButonCALayer : CALayer
7+
public class RadioButtonCALayer : CALayer
88
{
99
const float _checkLineWidth = 2f;
1010
const float _containerLineWidth = 2f;
@@ -22,7 +22,7 @@ public class RadioButonCALayer : CALayer
2222
readonly CAShapeLayer _checkLayer = new CAShapeLayer();
2323
readonly CAShapeLayer _containerLayer = new CAShapeLayer();
2424

25-
public RadioButonCALayer(RadioButton radioButton, UIButton nativeControl)
25+
public RadioButtonCALayer(RadioButton radioButton, UIButton nativeControl)
2626
{
2727
NeedsDisplayOnBoundsChange = true;
2828
_radioButton = radioButton;

Xamarin.Forms.Platform.iOS/Renderers/RadioButtonRenderer.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ protected override void SetAccessibilityLabel()
136136

137137
protected virtual CALayer CreateRadioBoxLayer()
138138
{
139-
return new RadioButonCALayer(Element, Control);
139+
return new RadioButtonCALayer(Element, Control);
140140
}
141141

142142
void SetRadioBoxLayer(CALayer layer)

Xamarin.Forms.Platform.iOS/Xamarin.Forms.Platform.iOS.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@
177177
<Compile Include="Renderers\IShellSectionRootHeader.cs" />
178178
<Compile Include="Renderers\PageContainer.cs" />
179179
<Compile Include="Renderers\CheckBoxRendererBase.cs" />
180-
<Compile Include="Renderers\RadioButonCALayer.cs" />
180+
<Compile Include="Renderers\RadioButtonCALayer.cs" />
181181
<Compile Include="Renderers\RadioButtonRenderer.cs" />
182182
<Compile Include="Renderers\WkWebViewRenderer.cs" />
183183
<Compile Include="Renderers\ElementSelectedEventArgs.cs" />

0 commit comments

Comments
 (0)