CK.Plugins.ObjectExplorer.AutoExpand.RealizeChildren C# (CSharp) Method

RealizeChildren() private static method

private static RealizeChildren ( ItemsControl container ) : void
container System.Windows.Controls.ItemsControl
return void
        private static void RealizeChildren( ItemsControl container )
        {
            ItemContainerGenerator g = container.ItemContainerGenerator;
            if( g.Status == GeneratorStatus.NotStarted )
            {
                IItemContainerGenerator ig = (IItemContainerGenerator)g;
                using( ig.StartAt( new GeneratorPosition( -1, 0 ), GeneratorDirection.Forward, true ) )
                {
                    DependencyObject v = null;
                    while( (v = ig.GenerateNext()) != null ) ig.PrepareItemContainer( v );
                }
            }
        }