I have a Stackpanel and want that the items automatically set their sizes regarding to their contents but the items should not automatically fill the height of the Stackpanel (But Stackpanel should have auto height according to largest item). I also tried WrapPanel which has the same problem.
I want the TextBox "test" be be vertically centered and automatically sized depending on its text.
<TextBox Name="test" VerticalContentAlignment="Center">test</TextBox>
<StackPanel Name="ParameterList" Orientation="Vertical">
<TextBox Name="ParamComment" Foreground="Gray">no comment..</TextBox>
<TextBox Name="ParamComment2" Foreground="Gray">no comment..</TextBox>
</StackPanel>
</WrapPanel>