CommunityToolkit / CommunityToolkit/Windows
Regression in ColorPicker ColorPalette
- Dominant language
- C#
- Stars
- 1.1k
- Forks
- 166
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the bug
The GridView in ColorPicker that shows the ColorPalette, used to be two-way Binding to the selected color. The (much appreciated) work in #742 converted this to manual event subscription. Unfortunately, the path that updates the selected item when the color changes was forgotten. So effectively it is now a one-way binding from the control to the selected color.
### Steps to reproduce
```text
Add a ColorPicker to your project.
Go to the color palette tab.
Click on any color (let's say red)
Navigate to any other tab and change the selected color. (Maybe select blue in the color spectrum.)
Navigate back to the color palette tab.
Notice that the color chosen here previously (red) is still showing as selected. When you click on red, the selected color does not change back to red.
```
### Expected behavior
I expect the ColorPalette to follow the selected color in the same way as the rest of the color choosing elements are.
### Screenshots
https://github.com/user-attachments/assets/8bc95fcb-14e3-429e-85ad-9b521fb06420
### Code Platform
- [ ] UWP
- [x] WinAppSDK / WinUI 3
- [ ] Web Assembly (WASM)
- [ ] Android
- [ ] iOS
- [ ] MacOS
- [ ] Linux / GTK
### Windows Build Number
- [ ] Windows 10 1809 (Build 17763)
- [ ] Windows 10 1903 (Build 18362)
- [ ] Windows 10 1909 (Build 18363)
- [ ] Windows 10 2004 (Build 19041)
- [ ] Windows 10 20H2 (Build 19042)
- [ ] Windows 10 21H1 (Build 19043)
- [ ] Windows 10 21H2 (Build 19044)
- [ ] Windows 10 22H2 (Build 19045)
- [x] Windows 11 21H2 (Build 22000)
- [ ] Other (specify)
### Other Windows Build number
_No response_
### App minimum and target SDK version
- [ ] Windows 10, version 1809 (Build 17763)
- [ ] Windows 10, version 1903 (Build 18362)
- [ ] Windows 10, version 1909 (Build 18363)
- [x] Windows 10, version 2004 (Build 19041)
- [ ] Windows 10, version 2104 (Build 20348)
- [x] Windows 11, version 22H2 (Build 22000)
- [ ] Other (specify)
### Other SDK version
_No response_
### Visual Studio Version
_No response_
### Visual Studio Build Number
_No response_
### Device form factor
_No response_
### Additional context
_No response_
### Help us help you
Yes, but only if others can assist.
Contributor guide
Assessment
This issue has not been assessed yet.