Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ColorPicker throws InvalidCastException when setting a default color #3986

Closed
timunie opened this issue Nov 30, 2020 · 0 comments · Fixed by #3988
Closed

ColorPicker throws InvalidCastException when setting a default color #3986

timunie opened this issue Nov 30, 2020 · 0 comments · Fixed by #3988
Labels
Milestone

Comments

@timunie
Copy link
Collaborator

timunie commented Nov 30, 2020

Describe the bug

The new ColorPicker throws InvalidCastException("Cannot convert the given input to a valid color") on startup

Steps to reproduce

In the demo App set a default color in the ColorPicker-Example

<mah:ColorPicker mah:TextBoxHelper.AutoWatermark="True"
                    mah:TextBoxHelper.ClearTextButton="True"
                    mah:TextBoxHelper.UseFloatingWatermark="True"
                    mah:TextBoxHelper.Watermark="Select a color"
                    DefaultColor="Blue"
                    SelectedColor="{Binding ElementName=ColorCanvasExample, Path=SelectedColor}" />

Expected behavior

The ColorPicker should respect the default color

Actual behavior

image

Environment

MahApps.Metro version: v2.4.0
Windows build number: Win10 19042 [Version 10.0.18363.836]
Visual Studio: 2019 16.8.2
Target Framework: .Net Core 3.1 (v4.5.2, v4.7.2)

Screenshots

image

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

Successfully merging a pull request may close this issue.

2 participants