Skip to content

possible bug in ColorPicker - CustomPaletteColors property #3940

@jtorjo

Description

@jtorjo

Describe the bug

The ColorPicker has this dependency property

    public static readonly DependencyProperty CustomPaletteColorsProperty =
        DependencyProperty.Register(
            nameof(CustomPaletteColors),
            typeof(ObservableCollection<Windows.UI.Color>),
            typeof(uwp_toolkit_color_picker),
            new PropertyMetadata(Windows.UI.Color.FromArgb(0x00, 0x00, 0x00, 0x00)));

I believe this is in error from the get go, since it should be

    public static readonly DependencyProperty CustomPaletteColorsProperty =
        DependencyProperty.Register(
            nameof(CustomPaletteColors),
            typeof(ObservableCollection<Windows.UI.Color>),
            typeof(uwp_toolkit_color_picker),
            new PropertyMetadata( null ));

As a side note, sometimes, in debug mode, the original code crashes my app like a boss, without even a possibility to debug anything.

Steps to Reproduce

I could not create a small app to reproduce this, my app is huge, and this doesn't happen all the time

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions