wpf listview images

<ListView x:Name="lv">
<ListView.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Vertical"/>
</ItemsPanelTemplate>
</ListView.ItemsPanel>
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel>
<Image Source="{Binding ImagePath}" HorizontalAlignment="Center" VerticalAlignment="Center" Width="500" Height="500"/>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>

 

posted @ 2019-10-27 15:44  Fred1987  阅读(...)  评论(... 编辑 收藏