I am working on WinUI3 and the code below shows the image.
<ScrollViewer HorizontalScrollBarVisibility="Auto">
<ItemsRepeater ItemsSource="{x:Bind ViewModel.Collection}">
<ItemsRepeater.ItemTemplate>
<DataTemplate x:DataType="models:Stock">
<Border BorderBrush="Red" BorderThickness="1">
<StackPanel>
<Button Content="{x:Bind Code}" Margin="5"/>
<Button Content="{x:Bind Code}" Margin="5"/>
<Button Content="{x:Bind Code}" Margin="5"/>
</StackPanel>
</Border>
</DataTemplate>
</ItemsRepeater.ItemTemplate>
<ItemsRepeater.Layout>
<UniformGridLayout MaximumRowsOrColumns="2" Orientation="Vertical"/>
</ItemsRepeater.Layout>
</ItemsRepeater>
</ScrollViewer>
But what I want is that the height of the item changes as the size of the ScrollViewer changes.
The width of the item has a fixed value, but I want the height to be changed like Stretch of VerticalAlignment.
How can I make it?