Of course you can do it by updating the appropriate image list and
ListView
content in sync (what's the problem?) but why? The problem is not that you cannot do it, the problem is that the image showing mechanism is designed for a very
different functionality: showing a set of fixed images choosing them by their indices in a list of images. In this approach, the images themselves are not considered as part of data.
With a photo gallery, the image itself is the key part of data. So, instead of building a cumbersome work around, better change the design. If you want to stay with
ListView
(but why? are you sure?), one appropriate technique would be custom draw:
https://msdn.microsoft.com/en-us/library/system.windows.forms.listview.ownerdraw%28v=vs.110%29.aspx[
^],
https://msdn.microsoft.com/en-us/library/system.windows.forms.listview.drawitem%28v=vs.110%29.aspx[
^].
But who told you it should be the
ListView
(itself quite a cumbersome control)?
It would be way more natural to use
System.Windows.Forms.DataGridView
with some instances of
System.Windows.Forms.DataGridViewImageCell
, preferably by having one or more whole columns of the type
System.Windows.Forms.DataGridViewImageColumn
:
https://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewimagecolumn(v=vs.110).aspx[
^],
https://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewimagecell%28v=vs.110%29.aspx[
^],
https://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview%28v=vs.110%29.aspx[
^].
Much simpler, isn't it?
—SA