TrakHound_UI.Timeline.TimelineTray.HookChildElements C# (CSharp) Method

HookChildElements() protected method

protected HookChildElements ( System.Windows.Controls.UIElementCollection col ) : void
col System.Windows.Controls.UIElementCollection
return void
        protected void HookChildElements(
            UIElementCollection                         col
        )
        {
            TimelineBand                                b;

            foreach (UIElement  el in col)
            {
                if (el as TimelineBand != null)
                {
                    b = (TimelineBand) el;
                    b.TimelineTray = this;

                    if (b.IsMainBand)
                    {
                        m_mainBand = b;
                    }

                    m_bands.Add(b);
                }
                else if (el as TimelineToolbox != null)
                {
                    ((TimelineToolbox) el).SetSite(this);
                }
                else if (el as Panel != null)
                {
                    HookChildElements(((el) as Panel).Children);
                }
            }        

        }