i have a ListView set to Tileview. The ListView width is 300 and so is the tile width.
This works fine when the number of tiles does not overflow resulting in a scrollbar.
When it does overflow however, when the vertical scrollbar appears, a horizontal scrollbar also appears because the vertical scrollbar lowers the listview width for the tiles. Is there a way i can have the tiles autoresize to fill the listview?
See example image:
What currently happens:
What i want to happen:
I tried setting the width to 100% but that doesnt work. Any ideas?
There is no direct way to detect that the scrollbar became visible. An indirect way though, write an event handler for the ClientSizeChanged event:
Also change the DPI setting on your machine to verify that your tile size is still appropriate. That normally changes the size of the controls. ClientSize.Width is your friend.