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 - Binding to same DP on another instance of same object won't work.

 
 
Old 03-15-2006   #1 (permalink)
Marcus


 
 

Binding to same DP on another instance of same object won't work.

Hi,

I'm trying to bind the value of a custom control DP to the same DP on
another instance of the same custom control but receive a message
indicating that the "ElementName" is invalid...

Here is an example of the code I use:

<CustomControl1 x:Name="my_custom_1"/>

<CustomControl1 x:Name="my_custom_2
PropOne="{Binding
ElementName=my_custom_1,Path=PropOne,UpdateSourceTrigger=PropertyChanged}"

PropTwo="{Binding
ElementName=my_custom_1,Path=PropTwo,UpdateSourceTrigger=PropertyChanged}"

PropThree="{Binding
ElementName=my_custom_1,Path=PropThree,UpdateSourceTrigger=PropertyChanged}"
/>


This would return me that "my_custom_1" was not found...

In addition, If I substitute the second "CustomControl1" for 3
TextBlock and use the
same binding declarations, eveything works fine...

Any idea?

Thanks

Marcus


My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
Inherit from usercontrol - Object not set to instance of an object .NET General
datalist -- Object reference not set to an instance of an object. .NET General
Dynamically adding properties to an object instance PowerShell
Any way(s) to pass an IComparer object instance to ArrayList.sort? PowerShell
False IE doc body error - "Object reference not set to an instance of an object" 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