Skip to main content
Home Forums Silverlight Programming Programming with .NET - General how to get ListBoxItem's parent ListBox?
1 replies. Latest Post by Yi-Lun Luo - MSFT on May 26, 2008.
(0)
TBink
Member
254 points
188 Posts
05-23-2008 2:24 PM |
How do you (easily) get the parent listbox of a given listboxitem within that listbox. I know there are other ways to establish that relationship but I specifically want to know if there's a way something like
Listbox lstbx = mylistboxitem.getLogicalParent();
Parent only get the stackpanel within the ListBox assemblage
Yi-Lun L...
All-Star
25052 points
2,747 Posts
05-26-2008 12:06 AM |
Unfortunately there's no logical tree in Silverlight... But if your ListBox is not in a template, I mean when Visual Studio can generate a instance such as ListBox listBox1 in code behind, you can simply reference to that instance.