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

ColorCanvas has 14 Binding Expression Errors #4019

Closed
nzain opened this issue Jan 7, 2021 · 1 comment · Fixed by #4021
Closed

ColorCanvas has 14 Binding Expression Errors #4019

nzain opened this issue Jan 7, 2021 · 1 comment · Fixed by #4021
Labels
Milestone

Comments

@nzain
Copy link

nzain commented Jan 7, 2021

Describe the bug

Using the MahApps ColorCanvas results in 14 binding expressions errors when the control is displayed. VS2019 shows them in the new XAML Binding Failures tool (Debug > Windows > XAML Binding Failures). Alternatively, you add a TraceListener via PresentationTraceSources.DataBindingSource (this is what we use during development to avoid binding errors).

Steps to reproduce

Create a new WPF application (I used framework, but probably doesn't matter) and use a ColorCanvas, e.g. using the sample code from the MahApps ColorPicker Documentation.

<Window x:Class="MahAppsDemo.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:MahAppsDemo"
        xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
        mc:Ignorable="d"
        Title="MainWindow" Height="450" Width="800">
    <Grid>
        <mah:ColorCanvas x:Name="ColorCanvasExample"
                         SelectedColor="Blue"
                         DefaultColor="Transparent"
                         LabelAlphaChannel="Alpha"
                         LabelBlueChannel="Blue"
                         LabelGreenChannel="Green"
                         LabelRedChannel="Red" />
    </Grid>
</Window>

Expected behavior

No binding expression errors occur.

Actual behavior

14 binding expressions errors show up (see screenshot below). Using a TraceListener in combination with Debugger.Break(); calls completely kills the development experience.

Environment

MahApps.Metro version: v2.4.3
Windows build number: Win10 2004
Visual Studio: 2019 16.8.3
Target Framework: v4.7.2

Screenshots

image

@timunie
Copy link
Collaborator

timunie commented Jan 8, 2021

@punker76 can you assign me to this issue?

@punker76 punker76 added this to the 2.4.4 milestone Jan 8, 2021
punker76 pushed a commit to timunie/MahApps.Metro that referenced this issue Feb 25, 2021
This should resolve the binding issues.
punker76 added a commit to timunie/MahApps.Metro that referenced this issue Feb 25, 2021
batzen pushed a commit to batzen/MahApps.Metro that referenced this issue Mar 3, 2021
This should resolve the binding issues.
batzen pushed a commit to batzen/MahApps.Metro that referenced this issue Mar 3, 2021
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.

3 participants