Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi,
i create a project WPF with 3 files xaml of user control in this architecture
my question is how can i access from User control 1.1 to the the Grid control Parent? my objectif is maximize the popup child1.1 in same height and width of Grid control Parent.

Thanks for the help.

What I have tried:

i try to use dependency property but it's not worked. i need an others ideas or exemple that can inspired to fix this problem.Thanks for the help.
Posted
Updated 11-Feb-20 15:54pm
Comments
[no name] 10-Feb-20 18:56pm    
Controls in a "Grid" are part of the Grid's "Children" collection.

1 solution

Try this

Width="{Binding RelativeSource={RelativeSource FindAncestor, 
    AncestorType={x:Type GridControl}},Path=ActualWidth}"
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900