I am executing some code that looks like this:
Private Sub SetAllTelerikControlsSkin(ByVal Container As Control, ByVal Skin As String) |
For Each ctl In Container.Controls |
If Not (ctl.GetType().GetProperty("Skin") Is Nothing) Then |
ctl.EnableEmbeddedSkins = False |
ctl.Skin = Skin |
End If |
'Keep digging. If I have children, set them. |
If Not (ctl.GetType().GetProperty("HasChildren") Is Nothing) AndAlso ctl.HasChildren Then |
'Is a container control; call myself |
SetAllTelerikControlsSkin(ctl, Skin) |
End If |
Next ctl |
End Sub |
Starting out the Container parameter is "Me".
The problem is that any container controls, specifically the RadMultiPage's children (it's PageViews) don't get caught up here because it would seem that RadMultiPage doesn't have a property "Skin" and it doesn't have the Property "HasChildren" either. Do I have to do a special property call for MultiPage / PageViews in order to iterate down into them to set skin properties?
Any ideas so I don't have to go into the source code and set every RAD control manually by name whenever I add one to the control? I also plan on doing the same for any user controls in my page.