I have a UserControl, I do not set it’s Width / Height, the UserControl has 2 TextBox inside a StackPanel.
when I place it in a Column where it’s Width=”Auto”, the control stretches to fill the entire column, while the 2 TextBox maintain their Width (desire)
I want to keep the Control Width to it’s Content Width, how to I do that ?
I have a UserControl, I do not set it’s Width / Height, the UserControl
Share
This will keep the Control from stretching based on the container which it resides and instead will expand based on its contents if the
Widthis set toAuto.MSDN provides an overview on Alignment, Margins, and Padding which may be of assistance.