Method SetSizeToContent
SetSizeToContent(WindowSizeToContentMode)
Changes size of the control to fit the size of its content.
void SetSizeToContent(WindowSizeToContentMode mode = WindowSizeToContentMode.WidthAndHeight)
Parameters
mode
WindowSizeToContentModeSpecifies how a control will size itself to fit the size of its content.