Tinkr2/4.2/AphelionCore/AphelionCore/Controls/Control.cs
/// <summary>
/// Update the X/Y position offset of the control
/// </summary>
Update the X/Y position offset of the control
Update the X / Y position offset of the control
public void UpdateOffsets()
      {
         if (_parent != null)
         {
            _offsetX = _parent.Left;
            _offsetY = _parent.Top;
         }
         else
         {
            _offsetX = 0;
            _offsetY = 0;
         }
         var container = this as Container;
         if (container != null)
         {
            if (container.Children != null)
            {
               for (int i = 0; i < container.Children.Length; i++)
               {
                  container.Children[i].UpdateOffsets();
               }
            }
         }
      }
public void UpdateOffsets ( ) { if ( _parent != null ) { _offsetX = _parent . Left ; _offsetY = _parent . Top ; } else { _offsetX = 0 ; _offsetY = 0 ; } var container = this as Container ; if ( container != null ) { if ( container . Children != null ) { for ( int i = 0 ; i < container . Children . Length ; i ++ ) { container . Children [ i ] . UpdateOffsets ( ) ; } } } }
Update the X/Y position offset of the control
Update the X / Y position offset of the control
// Handle Containers