Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
override Microsoft.Maui.Controls.Shapes.Shape.OnPropertyChanged(string? propertyName = null) -> void
~override Microsoft.Maui.Controls.RadioButton.OnPropertyChanged(string propertyName = null) -> void
override Microsoft.Maui.Controls.GraphicsView.OnBindingContextChanged() -> void
~override Microsoft.Maui.Controls.RadioButton.OnPropertyChanged(string propertyName = null) -> void
override Microsoft.Maui.Controls.TitleBar.OnBindingContextChanged() -> void
override Microsoft.Maui.Controls.Handlers.Items.CarouselViewHandler.UpdateEmptyViewVisibility() -> void
~override Microsoft.Maui.Controls.SwipeItems.OnPropertyChanged(string propertyName = null) -> void
Expand Down
16 changes: 16 additions & 0 deletions src/Controls/src/Core/RadioButton/RadioButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,22 @@
base.ChangeVisualState();
}

#if ANDROID || WINDOWS
protected override void OnPropertyChanged([CallerMemberName] string propertyName = null)

Check failure on line 402 in src/Controls/src/Core/RadioButton/RadioButton.cs

View check run for this annotation

Azure Pipelines / maui-pr (Build .NET MAUI Build macOS (Release))

src/Controls/src/Core/RadioButton/RadioButton.cs#L402

src/Controls/src/Core/RadioButton/RadioButton.cs(402,27): error CS0111: (NETCORE_ENGINEERING_TELEMETRY=Build) Type 'RadioButton' already defines a member called 'OnPropertyChanged' with the same parameter types

Check failure on line 402 in src/Controls/src/Core/RadioButton/RadioButton.cs

View check run for this annotation

Azure Pipelines / maui-pr (Pack .NET MAUI Pack macOS)

src/Controls/src/Core/RadioButton/RadioButton.cs#L402

src/Controls/src/Core/RadioButton/RadioButton.cs(402,27): error CS0111: (NETCORE_ENGINEERING_TELEMETRY=Build) Type 'RadioButton' already defines a member called 'OnPropertyChanged' with the same parameter types

Check failure on line 402 in src/Controls/src/Core/RadioButton/RadioButton.cs

View check run for this annotation

Azure Pipelines / maui-pr (Pack .NET MAUI Pack macOS)

src/Controls/src/Core/RadioButton/RadioButton.cs#L402

src/Controls/src/Core/RadioButton/RadioButton.cs(402,27): error CS0111: (NETCORE_ENGINEERING_TELEMETRY=Build) Type 'RadioButton' already defines a member called 'OnPropertyChanged' with the same parameter types

Check failure on line 402 in src/Controls/src/Core/RadioButton/RadioButton.cs

View check run for this annotation

Azure Pipelines / maui-pr (Build .NET MAUI Build macOS (Debug))

src/Controls/src/Core/RadioButton/RadioButton.cs#L402

src/Controls/src/Core/RadioButton/RadioButton.cs(402,27): error CS0111: (NETCORE_ENGINEERING_TELEMETRY=Build) Type 'RadioButton' already defines a member called 'OnPropertyChanged' with the same parameter types
{
base.OnPropertyChanged(propertyName);

if (propertyName == BorderColorProperty.PropertyName)
{
Handler?.UpdateValue(nameof(IRadioButton.StrokeColor));
}
else if (propertyName == BorderWidthProperty.PropertyName)
{
Handler?.UpdateValue(nameof(IRadioButton.StrokeThickness));
}
}
#endif

[Obsolete("Use MeasureOverride instead")]
protected override SizeRequest OnMeasure(double widthConstraint, double heightConstraint)
{
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions src/Controls/tests/TestCases.HostApp/Issues/Issue35587.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
namespace Maui.Controls.Sample.Issues;

[Issue(IssueTracker.Github, 35587, "RadioButton BorderColor and BorderWidth not applied when dynamically updated at runtime", PlatformAffected.Android | PlatformAffected.UWP)]
public class Issue35587 : ContentPage
{
public Issue35587()
{
var radioButton = new RadioButton
{
AutomationId = "TestRadioButton",
Content = "RadioButton",
};

var applyBorderButton = new Button
{
AutomationId = "ApplyBorderButton",
Text = "Apply Border"
};

applyBorderButton.Clicked += (s, e) =>
{
radioButton.BorderColor = Colors.Green;
radioButton.BorderWidth = 3;
};

Content = new VerticalStackLayout
{
Padding = 20,
Spacing = 20,
Children =
{
radioButton,
applyBorderButton
}
};
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;

namespace Microsoft.Maui.TestCases.Tests.Issues;

public class Issue35587 : _IssuesUITest
{
public Issue35587(TestDevice device) : base(device) { }

public override string Issue => "RadioButton BorderColor and BorderWidth not applied when dynamically updated at runtime";

[Test]
[Category(UITestCategories.RadioButton)]
public void RadioButtonBorderAppliedAtRuntime()
{
App.WaitForElement("TestRadioButton");

// Tap the button to dynamically apply border properties
App.Tap("ApplyBorderButton");

// Verify the border is visually applied
VerifyScreenshot();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[major] Regression Prevention — This screenshot assertion is for an issue/fix explicitly affecting Windows as well as Android, but the PR only adds Android and iOS baselines; there is no TestCases.WinUI.Tests/snapshots/windows/RadioButtonBorderAppliedAtRuntime.png. On WinUI the new VerifyScreenshot() test will either fail for a missing baseline or remain unverified, so the Windows half of the regression is not covered. Please add the WinUI snapshot baseline (or split/skip Windows with an explicit reason).

}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading