Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
555
Controls collection and UltraToolbarsDockArea.
posted

Hi.

I need to enumerate through all controls on given form or usercontrol.

Generally, this is done by recursively iterating through controls property.

Now, I've got a form that has UltraToolbar on it. The Toolbar is not accessible directly via form.controls collection, but there are four dock area controls that can be accessed. For each one of them, controls collection is empty, i.e. neither one of them acts as regular container.

The question is what is the best way to access that toolbar?

Parents
No Data
Reply
  • 44743
    posted

    This is correct because toolbars and tools do not derived from Control. They are displayed using UIElements. The only time a dock area will contain another control is when a ControlContainerTool is placed on a toolbar or ribbon group. The contained control will be parented to the dock area.  To iterate through toolbars and tools though, this will have to be done with other code that is specific to toolbars managers.

Children