ComponentFactory.Krypton.Toolkit.KryptonTrackBar.SetBoundsCore C# (CSharp) Method

SetBoundsCore() protected method

Performs the work of setting the specified bounds of this control.
protected SetBoundsCore ( int x, int y, int width, int height, BoundsSpecified specified ) : void
x int The new Left property value of the control.
y int The new Top property value of the control.
width int The new Width property value of the control.
height int The new Height property value of the control.
specified BoundsSpecified A bitwise combination of the BoundsSpecified values.
return void
        protected override void SetBoundsCore(int x, int y, 
                                              int width, int height, 
                                              BoundsSpecified specified)
        {
            _requestedDim = (Orientation == Orientation.Horizontal) ? height : width;

            if (_autoSize)
            {
                if (Orientation == Orientation.Horizontal)
                {
                    if ((specified & BoundsSpecified.Height) != BoundsSpecified.None)
                        height = GetPreferredSize(Size.Empty).Height;
                }
                else if ((specified & BoundsSpecified.Width) != BoundsSpecified.None)
                    width = GetPreferredSize(Size.Empty).Width;
            }

            base.SetBoundsCore(x, y, width, height, specified);
        }