question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RadioButtonOuterEllipseFill lightweight radio button style does not work

See original GitHub issue

Describe the bug The lightweight style RadioButtonOuterEllipseFill (see documentation here) does not work. This was working before in UWP at some point.

Steps to reproduce the bug

 <RadioButton>
    <RadioButton.Resources>
           <ResourceDictionary>
                 <SolidColorBrush x:Key="RadioButtonOuterEllipseFill" Color="Red" />
                 <SolidColorBrush x:Key="RadioButtonOuterEllipseFillPointerOver" Color="Green" />
            </ResourceDictionary>
    </RadioButton.Resources>
</RadioButton>

RadioButton is filled white, and when hovered over changes to green, when it should be shown as a radiobutton filled in red that changes to green when pointer is over. Observe that RadioButtonOuterEllipseFill is not applied at all.

Version Info

NuGet package version:
WinUI 3 - Project Reunion 0.5: 0.5.5

Windows app type:

UWP Win32
Yes
Windows 10 version Saw the problem?
Insider Build (xxxxx)
October 2020 Update (19042) Yes
May 2020 Update (19041)
November 2019 Update (18363)
May 2019 Update (18362)
October 2018 Update (17763)
April 2018 Update (17134)
Fall Creators Update (16299)
Creators Update (15063)
Device form factor Saw the problem?
Desktop Yes
Xbox
Surface Hub
IoT

Additional context While I am not super familar with how WinUI works behind the scenes, I would guess that this line should also be a ThemeResource instead of a StaticResource.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
karkarlcommented, Apr 22, 2021

Additionally, this visual state group is the default state and should not have any setters:

https://github.com/microsoft/microsoft-ui-xaml/blob/2c1d7144a0c5ffe4fae25f0be2fdaf40bd41973c/dev/CommonStyles/RadioButton_themeresources.xaml#L220

The setters for the CommonStates were necessary for the colour animations to animate back to the correct colour. It seems when the colour animation bindings were updated they weren’t removed, let me investigate and will remove them if necessary.

I would guess that this line should also be a ThemeResource instead of a StaticResource.

I can send a fix out for that as well.

0reactions
chingucodingcommented, May 24, 2021

@karenbtlai Do you have any updates on this? ^^

Read more comments on GitHub >

github_iconTop Results From Across the Web

Styling radio button not working
I'm trying to style my radio buttons but for some reason it's not working. If I click on the one radio button then...
Read more >
<input type="radio"> - HTML: HyperText Markup Language
Radio buttons don't participate in constraint validation; they have no real value to be constrained. Styling radio inputs. The following example ...
Read more >
Guidelines for radio buttons - Windows apps
Learn how to use radio buttons to let users select one option from a collection of two or more mutually exclusive, but related,...
Read more >
Radios and Checkboxes - Button
The RadButton control provides an easy way to fully customize the look and feel of your check boxes and radio buttons. Any ButtonType...
Read more >
Radio Button | 4D Docs
The Regular radio button style is a standard system button (i.e., a small bullseye with text) which executes code when a user clicks...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found