private void SetAutoSize() { if (AutoSizeHorizontal) Width = GetWidth(); if (AutoSizeVertical) Height = GetHeight(); }