Exemplo n.º 1
0
        internal static void PropagateResumeLayout(UIElement e)
        {
            if ((e._flags & UIElement.Flags.IsLayoutSuspended) == UIElement.Flags.None)
            {
                return;
            }
            e._flags &= ~UIElement.Flags.IsLayoutSuspended;
            int           num           = (e._flags & UIElement.Flags.InvalidMeasure) == UIElement.Flags.None ? 0 : ((e._flags & UIElement.Flags.NeverMeasured) == UIElement.Flags.None ? 1 : 0);
            bool          flag          = (e._flags & UIElement.Flags.InvalidArrange) != UIElement.Flags.None && (e._flags & UIElement.Flags.NeverArranged) == UIElement.Flags.None;
            LayoutManager layoutManager = (num | (flag ? 1 : 0)) != 0 ? LayoutManager.From(e.Dispatcher) : (LayoutManager)null;

            if (num != 0)
            {
                layoutManager.MeasureQueue.Add(e);
            }
            if (flag)
            {
                layoutManager.ArrangeQueue.Add(e);
            }
            UIElementCollection logicalChildren = e._logicalChildren;

            if (logicalChildren == null)
            {
                return;
            }
            int count = logicalChildren.Count;

            for (int index = 0; index < count; ++index)
            {
                UIElement e1 = logicalChildren[index];
                if (e1 != null)
                {
                    UIElement.PropagateResumeLayout(e1);
                }
            }
        }
Exemplo n.º 2
0
 public LayoutQueue(LayoutManager layoutManager)
 {
     this._layoutManager = layoutManager;
     this._elements      = new ArrayList();
 }