views:

29

answers:

0

Is there a programmatic way to determine the available themes and skins that exist for a particular control type at run-time, without having to resort to I/O?

The IDE does this elegantly using the SkinIDTypeConverter - most of its logic can be found in GetStandardValues(ITypeDescriptorContext context) and the call to ThemeProvider.GetSkinsForControl. There's just one catch: this seems to rely on Control.Site, which is only available when the control has rendered on a design-surface.

Any ideas about how this would be done at run-time, outside of the IDE?