WrapPanel not wrapping when in a StackPanel with Horizontal orientation

前端 未结 2 1609
心在旅途
心在旅途 2021-02-19 07:20

The labels in the example below (WPF/XAML) just parade off the screen, no wrapping occurs. Removing the orientation works, but doesn\'t provided the needed functionality/look &

2条回答
  •  醉梦人生
    2021-02-19 07:42

    You can bind the WrapPanel's MaxWidth to the StackPanel's ActualWidth.

    I haven't tried this, but basically:

提交回复
热议问题