-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Windows] Fix for RadioButton BorderColor and BorderWidth not updated at runtime #28335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
SyedAbdulAzeemSF4852
wants to merge
7
commits into
dotnet:main
Choose a base branch
from
SyedAbdulAzeemSF4852:fix-15806
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
0e6630b
[Windows] Fix for 15806 ( RadioButton Border color not working for fo…
SyedAbdulAzeemSF4852 a542a6e
[Windows] Fix for 15806 ( RadioButton Border color not working for fo…
SyedAbdulAzeemSF4852 88dd1c0
[Windows] Fix for 15806 ( RadioButton Border color not working for fo…
SyedAbdulAzeemSF4852 72df5a3
[Windows] Fix for 15806 ( RadioButton Border color not working for fo…
SyedAbdulAzeemSF4852 6c5880a
[Windows] Fix for 15806 ( RadioButton Border color not working for fo…
SyedAbdulAzeemSF4852 ce87bbf
[Windows] Fix for 15806 ( RadioButton Border color not working for fo…
SyedAbdulAzeemSF4852 6e71922
[Windows] Fix for 15806 ( RadioButton Border color not working for fo…
SyedAbdulAzeemSF4852 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+26.9 KB
...ts/TestCases.Android.Tests/snapshots/android/ValidateRadioButtonBorderColor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| namespace Controls.TestCases.HostApp.Issues; | ||
|
|
||
| [Issue(IssueTracker.Github, 15806, "RadioButton Border color not working for focused visual state", PlatformAffected.All)] | ||
| class Issue15806 : ContentPage | ||
| { | ||
| public Issue15806() | ||
| { | ||
| VerticalStackLayout verticalStackLayout = new VerticalStackLayout(); | ||
|
|
||
| Style radioButtonStyle = new Style(typeof(RadioButton)) | ||
| { | ||
| Setters = | ||
| { | ||
| new Setter | ||
| { | ||
| Property = VisualStateManager.VisualStateGroupsProperty, | ||
| Value = new VisualStateGroupList | ||
| { | ||
| new VisualStateGroup | ||
| { | ||
| Name = "CheckedStates", | ||
| States = | ||
| { | ||
| new VisualState | ||
| { | ||
| Name = "Normal", | ||
| Setters = | ||
| { | ||
| new Setter { Property = RadioButton.BorderColorProperty, Value = Colors.Red }, | ||
| new Setter { Property = RadioButton.BorderWidthProperty, Value = 2 } | ||
| } | ||
| }, | ||
|
|
||
| new VisualState | ||
| { | ||
| Name = "Focused", | ||
| Setters = | ||
| { | ||
| new Setter { Property = RadioButton.BorderColorProperty, Value = Colors.DarkCyan }, | ||
| new Setter { Property = RadioButton.BorderWidthProperty, Value = 2 } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }; | ||
|
|
||
| RadioButton focusedRadioButton = new RadioButton | ||
| { | ||
| AutomationId = "FocusedRadioButton", | ||
| Content = "RadioButton", | ||
| Style = radioButtonStyle, | ||
| IsChecked = true, | ||
| }; | ||
|
|
||
| RadioButton normalRadioButton = new RadioButton | ||
| { | ||
| AutomationId = "NormalRadioButton", | ||
| Content = "RadioButton", | ||
| Style = radioButtonStyle, | ||
| }; | ||
|
|
||
| verticalStackLayout.Children.Add(focusedRadioButton); | ||
| verticalStackLayout.Children.Add(normalRadioButton); | ||
|
|
||
| Content = verticalStackLayout; | ||
| } | ||
| } |
Binary file added
BIN
+11.1 KB
...rols/tests/TestCases.Mac.Tests/snapshots/mac/ValidateRadioButtonBorderColor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions
22
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue15806.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| using NUnit.Framework; | ||
| using UITest.Appium; | ||
| using UITest.Core; | ||
|
|
||
| namespace Microsoft.Maui.TestCases.Tests.Issues; | ||
|
|
||
| internal class Issue15806 : _IssuesUITest | ||
| { | ||
| public Issue15806(TestDevice device) : base(device) { } | ||
|
|
||
| public override string Issue => "RadioButton Border color not working for focused visual state"; | ||
|
|
||
| [Test] | ||
| [Category(UITestCategories.RadioButton)] | ||
| public void ValidateRadioButtonBorderColor() | ||
| { | ||
| App.WaitForElement("FocusedRadioButton"); | ||
| App.Tap("NormalRadioButton"); | ||
| VerifyScreenshot(); | ||
| } | ||
| } | ||
|
|
||
Binary file added
BIN
+8.02 KB
...ests/TestCases.WinUI.Tests/snapshots/windows/ValidateRadioButtonBorderColor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+10.4 KB
...rols/tests/TestCases.iOS.Tests/snapshots/ios/ValidateRadioButtonBorderColor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.