Click here to Skip to main content
15,887,477 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I'm trying to access the isVisible property for the ListBoxItems in some of my ListBoxes. The Microsoft Docs for the ListBoxItem say the IsVisible property is a Dependency Property. After reading the document on Dependency Properties, I'm still not clear on how to implement and access that property. Any ideas would be greatly appreciated. Thanks.

What I have tried:

I've read some of the documentation on Dependency Properties, but it's still not clear how to implement this. It appears that somebody could setup there own dependency properties, but if this one already exists (does it have some sort of default implementation), then I'd like to access and use it.
Posted
Updated 12-Jul-18 9:51am
v2

1 solution

isVisible is a "getter" for the "state" of the Visibilty property.

Set the Visibility property to affect the isVisible property.
 
Share this answer
 
Comments
Matthew Menard 12-Jul-18 16:23pm    
My listbox is a System.Windows.Forms.ListBox and it's set to a single selection. I'm trying to find out if a particular item is in the visible viewer area or not. I saw that the System.Windows.Controls.ListBoxItem has an isVisible property, so I thought I could create one and add that to my ListBox, but I'm having trouble.
Graeme_Grant 12-Jul-18 19:41pm    
You tagged the question as WPF yet you mention that you are using a WinForm control. The two UI Frameworks are very different to work with. Please update your question above with the correct information, then you may get the contextually correct 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