开发者

Two Rows in a Horizontal Stack Panel? (WPF)

开发者 https://www.devze.com 2023-03-04 05:30 出处:网络
I have this stack panel (contains four fractions): (Fractions are just text with new lines开发者_StackOverflow and hyphens.) If I add a fifth fraction, it\'ll go to the right of 10/12, instead of f

I have this stack panel (contains four fractions):

Two Rows in a Horizontal Stack Panel? (WPF)

(Fractions are just text with new lines开发者_StackOverflow and hyphens.) If I add a fifth fraction, it'll go to the right of 10/12, instead of forming a second row.

How do I configure my StackPanel so that it'll overflow into a second row (and stay within the bounds of the StackPanel) instead of overflowing invisibly?

Markup:

<StackPanel Name="_fractionContainer" Width="700" Height="600"
      Orientation="Horizontal" Margin="8, 8, 8, 8" Background="White" />  


Use a wrap panel instead

<WrapPanel Name="_fractionContainer" Orientation="Horizontal" ...>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号