我已将 imagelistview 添加到带有按钮的用户控件中。imagelistview 是可在 nuget 上获得的自定义外部(可在链接http://www.nuget.org/packages/ImageListView/中找到)。我正在运行 .net 4.0 并在 vb.net 中编码
我已将 imagelistview 缓存模式设置为连续并放置以下代码:
Private Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
ImageListView1.SetRenderer(New Manina.Windows.Forms.ImageListViewRenderers.TilesRenderer(200))
If OpenFileDialog1.ShowDialog = vbOK Then
Dim file As String
For Each file In OpenFileDialog1.SafeFileNames
ImageListView1.Items.Add(file)
Next
End If
End Sub
但是,图像不显示其缩略图。你如何显示图像?