Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - Questions about binding

 
 
Old 02-15-2006   #1 (permalink)
Mario Goebbels


 
 

Questions about binding

How do I bind properties of an unnamed parent? It worked fine in older
builds, now I have to identify the parent in some way. This for instance
wouldn't work:

<Expander Header="Foo" Width="256">
<ListBox Width="{Binding Path=ActualWidth}">
<ListBoxItem>Bar</ListBoxItem>
</ListBox>
</Expander>

The result is that the listbox doesn't fill the width of the expander as
expected.

However if I give the expander a name and drop an ElementName reference into
the mix, it reads out the parent properties. In the past, omitting a
reference to another object would automatically assume the parent. How do I
get this working?

The documentation doesn't help at all here. Which leads me to another
question, why aren't special accessors for RelativeSource et al (for example
/TemplatedParent and /Self) not covered in the documentation? How am I
supposed to find out about things like this?

Thanks.

-mg



My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
Questions, questions, questions... on how to improve PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46