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

1. Binding written in xaml is useless; 2. Crash if adorned element is collapsed; #24

Open
Larry-Liang opened this issue Jul 26, 2018 · 5 comments
Labels
needs-repro Unable to reproduce the issue described. More info needed.

Comments

@Larry-Liang
Copy link

No description provided.

@JohanLarsson
Copy link
Member

JohanLarsson commented Jul 26, 2018

Not sure what you mean by #1 but guessing it is due to the adorner not being in the visual tree. Maybe post a sample?

2# Sounds like a bug.

Can you split it up into two issues?

@Larry-Liang
Copy link
Author

Sorry for my laziness. Anyway, as for the 1st one, exactly, binding is invalid in xaml if its source is a relativesource or a concrete element(whenever elements are in adorner layer or not). However, I wrote bindings in code behind, they worked!

@Larry-Liang
Copy link
Author

<Canvas>
                <Thumb
                    Name="thumb"
                    Canvas.Left="199"
                    Canvas.Top="204"
                    Width="80"
                    Height="30"
                    DragDelta="thumb_DragDelta">
                    <ad:Adornment.Content>
                        <Rectangle
                            Width="80"
                            Height="{Binding ElementName=thumb, Path=Width}"
                            ad:Adornment.Left="0"
                            ad:Adornment.Top="-110"
                            Fill="Red" />
                    </ad:Adornment.Content>
                </Thumb>

            </Canvas>

@JohanLarsson
Copy link
Member

JohanLarsson commented Jul 27, 2018

Try with x:Reference
This stuff is pretty messy but I think the adorners work the same way as for example tooltips.

@JohanLarsson
Copy link
Member

I wrote UI-tests collapsing and restoring the adorned element but they fail to repro the bug. Do you have repro steps?

@JohanLarsson JohanLarsson added the needs-repro Unable to reproduce the issue described. More info needed. label Aug 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-repro Unable to reproduce the issue described. More info needed.
Projects
None yet
Development

No branches or pull requests

2 participants