-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Calling ClearValue if a color is null on WinUI is incorrect behavior #4356
Copy link
Copy link
Closed
Labels
fixed-in-6.0.408Look for this fix in 6.0.408!Look for this fix in 6.0.408!legacy-area-controlsLabel, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, EditorLabel, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editorplatform/windowss/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Milestone
Description
Description
| nativeControl.ClearValue(property); |
If a property is set via a TemplateBinding or a ThemeResource inside a ControlTemplate then calling ClearValue will just reset the property to the DP default
If the color is null then UpdateProperty should just do nothing
Steps to Reproduce
Call UpdateProperty on a Control inside ControlTemplate with a null color and you'll see it doesn't actually revert to a relevant default value
For example, when setting the TabBar we are setting the background on the following control that's set via a ThemeResource
If the user sets the color back to null then clearing that DP doesn't re-instate the ThemeResource
Version with bug
Preview 13
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
WinUI
Did you find any workaround?
No response
Relevant log output
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
fixed-in-6.0.408Look for this fix in 6.0.408!Look for this fix in 6.0.408!legacy-area-controlsLabel, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, EditorLabel, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editorplatform/windowss/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working