Tinkr2/4.2/AphelionCore/AphelionCore/Controls/Control.cs
/// <summary>
/// Update the X/Y position offset of the control
/// </summary>
/// <param name="pt">When supplied this sets an exact offset for the control, regardless of its parent position and offset</param>
/// <remarks>
/// If point pt is passed the native offsetting is ignored in favor of the supplied coordinated; this can yield unexpected results.
/// </remarks>
Update the X/Y position offset of the control
Update the X / Y position offset of the control
public void UpdateOffsets(point pt)
      {
         _offsetX = pt.X;
         _offsetY = pt.Y;
         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 ( point pt ) { _offsetX = pt . X ; _offsetY = pt . Y ; 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
pt
point
When supplied this sets an exact offset for the control, regardless of its parent position and offset
When supplied this sets an exact offset for the control regardless of its parent position and offset
remarks
If point pt is passed the native offsetting is ignored in favor of the supplied coordinated; this can yield unexpected results.
If point pt is passed the native offsetting is ignored in favor of the supplied coordinated ; this can yield unexpected results .