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 - Binging Failures #4538

Open
zygfrydw opened this issue Jan 8, 2025 · 1 comment
Open

ColorPicker - Binging Failures #4538

zygfrydw opened this issue Jan 8, 2025 · 1 comment
Labels

Comments

@zygfrydw
Copy link

zygfrydw commented Jan 8, 2025

Describe the bug

ColorPicker control throws 13 binding failures on application start. The control works correctly, although the Visual Studio 2022 reports 13 XAML Binding Failures:

Severity Count Data Context Binding Path Target Target Type Description
Error 1 null SelectedHSVColor SolidColorBrush.Color Color Cannot find governing FrameworkElement or FrameworkContentElement for target element.
Error 8 null SelectedColor GradientStop.Color Color Cannot find governing FrameworkElement or FrameworkContentElement for target element.
Error 4 null SelectedHSVColor GradientStop.Color Color Cannot find governing FrameworkElement or FrameworkContentElement for target element.

Steps to reproduce

  1. Create a new WPF project, add MahApps.Metro 2.4.10 Nuget package and MetroWindow
  2. Implement MainWindow.xaml as
<mah:MetroWindow x:Class="MahSandbox.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
        Title="MainWindow"
        Height="600"
        Width="800">
        <mah:ColorPicker/>
</mah:MetroWindow>
  1. Start with debugger
  2. See error
    image

Expected behavior

No binding failures.

Actual behavior

13 binding failures.

Environment

MahApps.Metro version: v2.4.10
Windows build number: Win11 Home 24H2 [Version 26100.2605]
Visual Studio: 2022
Target Framework: .Net v8.0
@zygfrydw zygfrydw added the Bug label Jan 8, 2025
@timunie
Copy link
Collaborator

timunie commented Jan 21, 2025

Sometimes these warnings can't be avoided. I believe this is a .NET issue and not a MahApp issue, as long as the control runs otherwise fine.

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

No branches or pull requests

2 participants