Skip to content

ColorPicker may loose SelectedColor if DropDown closes #3991

@timunie

Description

@timunie

Describe the bug

If you select a Color from the RecentColorPalette and close the ColorPicker the control loses the SelectedColor and sets the default instead.

Steps to reproduce

  1. Set AddToRecentColor=ColorPickerClosed
  2. Select different colors
  3. Select a color from recent colors.
  4. Open and close the ColorPicker serveral times

Expected behavior

ColorPicker should remember the selection.

Actual behavior

ColorPicker looeses the selection. This behaviour exists since the last recent changes. The problem seems to be related to removing these lines:
image

Environment

MahApps.Metro version: v2.4.1
Windows build number: Win10 20H2 [Version 10.0.19042.662]
Visual Studio: 2019 16.6.0
Target Framework: .Net Core 3.1 (v4.5.2, v4.7.2)

Screenshots

ColorPickerIssue

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions