リストボックス内に表示される製品のリストを作成しています。私は水平にスクロールリストを持っていますが、リストボックスが水平にスクロールを開始する前に2行を移入するのに十分な高さであっても、アイテムの1行しか取得しません。WPF水平リストボックスの縦方向の塗りつぶし
私のWPFコードの一部です。私が探している
<DataTemplate x:Key="productTemplate">
<WrapPanel Orientation="Horizontal" Width="10" Height="10">
<Image Source="{Binding Photo}" Stretch="Fill" HorizontalAlignment="Center" VerticalAlignment="Center" Width="288" Height="320"/>
<Label Content="{Binding Name}" />
<Label Content="{Binding Cost}" />
</WrapPanel>
</DataTemplate>
<ListBox Width="1334" ItemsSource="{Binding Products}" SelectedItem="{Binding SelectedProduct}" ItemTemplate="{DynamicResource productTemplate}" Height="865" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Disabled" BorderThickness="0">
<ListBox.Background>
<SolidColorBrush Color="White" Opacity="0.85"/>
</ListBox.Background>
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel IsItemsHost="True" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListBox>
:
すべてのヘルプは素晴らしいことです。
くそー、この¬¬乾杯(y)をしようとするので、近くにあった、それを引き抜きに – Sjc311