Skip to content

ColorPicker doesn't change if initial value is #000000 #7360

Open

Description

Describe the bug

The ColorPicker control in WinUI 3 doesn't update itss value if the initial value is set to argb #FF000000.

Steps to reproduce the bug

  1. Create new WinUI 3 project. In MainWindow.xaml, set XAML:

<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center"> <ColorPicker Color="{x:Bind SelectedColor, Mode=TwoWay}" /> </StackPanel>

  1. In code-behind:

public Color SelectedColor { get; set; }

var color = ColorHelper.FromArgb(255, 0, 0, 1); SelectedColor = color;

After launching, click anywhere in color palette and see only Black stays. Any value other than black works, including white. Same effect can be seen by simply setting the ColorPicker value to #000000 and clicking around.

Expected behavior

Black would follow same logic as other colors.

Screenshots

image

NuGet package version

No response

Windows app type

  • UWP
  • Win32

Device form factor

Desktop

Windows version

Windows 11 (22H2): Build 22621

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions