xceedsoftware / wpftoolkit

All the controls missing in WPF. Over 1 million downloads.
Other
3.91k stars 878 forks source link

How do I get the one of the exact control after all property controls are generated? #1700

Closed cdytoby closed 2 years ago

cdytoby commented 2 years ago

For example, I want to get the second ComboBox in the list, and I want to do something to it, like changing the available items. How do I access it after all controls are generated?

cdytoby commented 2 years ago

OK I solved it by using the property "propertyGrid.Properties", it is type IList and no documentation mentions this IList is a list of type "PropertyItem" (namespace Xceed.Wpf.Toolkit.PropertyGrid), from there I can access "PropertyName" and "Editor", and the "Editor" is the actual control of that property.

I hope you can document it with these detail.

XceedBoucherS commented 2 years ago

Hello. for PropertyGrid.Properties, the documentation says : Gets the current collection of generated PropertyItem instances. https://doc.xceed.com/xceed-toolkit-plus-for-wpf/webframe.html#Xceed.Wpf.Toolkit~Xceed.Wpf.Toolkit.PropertyGrid.PropertyGrid~Properties.html

So we know we will have PropertyItem.

What more details would you expect ? Thank you.

cdytoby commented 2 years ago

Sorry, I didn't realize there is an extra documentation exist. How do I access it?

I only checked https://github.com/xceedsoftware/wpftoolkit/wiki/PropertyGrid this page, and the Properties in the table says:

"Gets the current collection of generated PropertyItems."

I didn't realize PropertyItems is a type "PropertyItem", also I didn't realize there I can access generated controls.

Also, how do I access the page https://doc.xceed.com/xceed-toolkit-plus-for-wpf/webframe.html from this GitHub page? I don't know that it exists.

XceedBoucherS commented 2 years ago

Ok sorry, I gave you the link for the documentation of the commercial version of Xceed Toolkit.

On GitHub, you have the free version of Xceed Toolkit, with a smaller documentation. The commercial version is the free version + some new features and new controls. The commercial product documentation is still valid when you use the free version.

On GitHub, you have more details about the commercial version here : https://github.com/xceedsoftware/wpftoolkit/wiki/Xceed-Toolkit-Plus-for-WPF

I can modify the definition of PropertyGrid.PropertyItems with the one from the commercial version. Thank you.