I need to stretch the window to the width of the height of the elements inside, I make the fields collapsed visible, but as the fields become larger, the window no longer contains everything, and you cannot use sliders.

<window> <grid> <UniformGrid Visibility="Collapsed" /> <TextBlock Visibility="Collapsed" /> <grid> </window> 

and it turns out I need to stretch the window along with the grid

    1 answer 1

    If the window only has a grid , then it’s best to use the window property SizeToContent="WidthAndHeight"

    • one
      @ SashaBlack thanks! understood my mistake. - Yurii Manziuk