Ejemplo n.º 1
0
 internal void _Construct(Root Root)
 {
     this.Root = Root;
     if (!Constructed)
     {
         Constructed = true;
         this.Construct();
         Root.SafeCall(OnConstruct, this);
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Run the layout engine on this widget and all children.
        /// Warning: This operation invalidates the entire tree and potentially moves all children widgets.
        /// </summary>
        public virtual void Layout()
        {
            Root.SafeCall(this.OnLayout, this);
            var inside = GetDrawableInterior().Interior(InteriorMargin);

            foreach (var child in Children)
            {
                inside = LayoutChild(inside, Padding, child);
            }
            Invalidate();
        }