ColorPicker with ColorSlider
See original GitHub issueHi,
The ColorSlider of a ColorPicker is working strange and makes the control useless.
Describe the bug
I have tried to use the the Microsoft.UI.Xaml ColorPicker (and also the UWP one) with the ColorSpectrumComponents value set to “SaturationValue”.
<ColorPicker ColorSpectrumShape="Box"
Color="Red"
Width="312"
IsColorChannelTextInputVisible="False"
IsColorSliderVisible="True"
IsAlphaEnabled="False"
IsHexInputVisible="False"
RenderTransformOrigin="0.5,0.5"
ColorSpectrumComponents="SaturationValue" />
The Xaml above renders this output which really looks great. You can use the slider to pick another color.
The problem starts when you set the Color to Black or White.
<ColorPicker ColorSpectrumShape="Box"
Color="Black"
Width="312"
IsColorChannelTextInputVisible="False"
IsColorSliderVisible="True"
IsAlphaEnabled="False"
IsHexInputVisible="False"
RenderTransformOrigin="0.5,0.5"
ColorSpectrumComponents="SaturationValue" />
The color slider becomes completely Black and with White it ‘disappears’. I expected the rainbow color which I had when the color was set to Red. Is this a bug?
Maybe I shouldn’t use the ColorSpectrumComponents, so I set it back to the default (HueSaturation) and set the Color to Black.
<ColorPicker ColorSpectrumShape="Box"
Color="Black"
Width="312"
IsColorChannelTextInputVisible="False"
IsColorSliderVisible="True"
IsAlphaEnabled="False"
IsHexInputVisible="False"
RenderTransformOrigin="0.5,0.5"
ColorSpectrumComponents="HueSaturation" />
Does this look like a ColorPicker? I don’t think so. Is this a bug?
For me the Color Picker with a Color Slider is useless. Or am I stupid and doing something wrong?
Expected behavior The ColorPicker in the Paint 3D app is doing what I want. Does anybody know if the ColorPicker which is in the Paint 3D app is available as a component?
Version Info Windows 10 Desktop, 1809, 17763, WinUI NuGet 2.0.181018003
NuGet package version: Microsoft.UI.Xaml 2.0.181018003
Windows 10 version:
- Insider Build (xxxxx)
- October 2018 Update (17763)
- April 2018 Update (17134)
- Fall Creators Update (16299)
- Creators Update (15063)
- Anniversary Update (14393)
Device form factor:
- Desktop
- Mobile
- Xbox
- Surface Hub
- IoT
Additional context
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:5 (4 by maintainers)
This sounds like an issue that @kikisaints and @llongley might have addressed with a behavior change recently. I don’t believe that update is in a package on the feed yet however. Would you be able to try the nupkg from the latest CI build? You can click the “Artifacts” button to download it. Here’s the description from the PR before we went open:
I don’t know the answer for what control Paint3D is using, Kiki might know. I suspect they wrote something custom.
Yeah, it also works in the 2.1.181217001-prerelease. Thanks and a Merry Christmas.