UWP WrapPanel 替换?

UWP WrapPanel Replacement?

是否有此 WPF 代码的替代品?

<WrapPanel>
    <TextBlock Width="100" Height="20"/>
    <TextBlock Width="30" Height="50"/>
    <TextBlock Width="150" Height="70"/>                    
</WrapPanel>

如果有none...

这真的很蠢

更新:

我忘了说 WrapPanel 的宽度小于所有 TextBlock 的总宽度。这意味着某些项目需要换行到第二行。

我认为这是大多数人使用 WrapPanel 的目的,但显然有些人将它用于 Horizo​​ntal StackPanel(在这种情况下,您应该将 StackPanel 的 Orientation 设置为 Horizontal.. .)

好吧好吧,在我发布这篇文章 5 分钟后,我发现了 VariableSizedWrapGrid!它是确切的替代品,只是名称不同 (?!?)。

另一种选择:

  1. 从 NuGet 安装 Microsoft.Toolkit.Uwp.UI.Controls 库包
  2. 使用 WrapPanel 控件

简单。