Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

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

Closed Thread
 
Thread Tools Display Modes
Old 03-15-2006   #1 (permalink)
Marcus
Guest


 

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

Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
datalist -- Object reference not set to an instance of an object. Deere .NET General 0 1 Week Ago 09:09 AM
Is binding a datacontext to a CLR object correct ? Pon Avalon 2 03-25-2007 05:31 PM
Dynamically adding properties to an object instance dan.farino@gmail.com PowerShell 1 12-19-2006 04:27 PM
Any way(s) to pass an IComparer object instance to ArrayList.sort? Sung M Kim PowerShell 4 11-27-2006 09:23 PM
False IE doc body error - "Object reference not set to an instance of an object" Alex K. Angelopoulos [MVP] PowerShell 7 07-15-2006 09:46 PM








Vistax64.com 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 2005-2008

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 47 48 49 50