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

Bindings are broken in SplitView #4468

Closed
TheCamel opened this issue Feb 27, 2024 · 0 comments · Fixed by #4471
Closed

Bindings are broken in SplitView #4468

TheCamel opened this issue Feb 27, 2024 · 0 comments · Fixed by #4471
Labels
Milestone

Comments

@TheCamel
Copy link

Bindings are broken in SplitView

I had a form that was working...and to replace a dialog, i included all the form content in the SplitView and put the dialog in the pane. All was working till we saw that all previous bindings are broken, also the {Binding ElementName= ??

Steps to reproduce

Take the actual demo form, add bindings between 2 elements

 <Grid Background="CornflowerBlue">
     <TextBlock Margin="10"
                HorizontalAlignment="Stretch"
                VerticalAlignment="Stretch"
                FontSize="20"
                Foreground="Black"
                Text="{Binding ElementName=test, Path=Value}"
                 />
     <Slider x:Name="test" Minimum="0" Maximum="100"></Slider>
 </Grid>

run it, try find the binding error in the output logs

System.Windows.Data Error: 4 : Cannot find source for binding with reference 'ElementName=test'. BindingExpression:Path=Value; DataItem=null; target element is 'TextBlock' (Name=''); target property is 'Text' (type 'String')

Environment

MahApps.Metro version: v3.0.0 alpha0476
Target Framework: Core 8

Screenshots

@TheCamel TheCamel added the Bug label Feb 27, 2024
@punker76 punker76 added this to the 3.0.0 milestone Mar 4, 2024
punker76 added a commit that referenced this issue Mar 5, 2024
Change SplitView from Control to ContentControl to fix these binding issues. Introduce also PaneTemplate dependency property and change the Pane property type to object.
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