Sometimes you may want to allow a user to switch between file view modes. Thumbnail view mode is usually the most convenient one, but it is the slowest way to display the folder content, that's why it would be preferable for a user to be able to switch to the detailed list view (or some other one), which works much faster.
It can be carried out in two ways. First of all, you can enable the right-click menu,
which allows switching between various view modes (just set the ShowContextMenu property to
The idea is very simple. You add HTML element containing necessary view modes
<input type="radio">, or whatever),
and change the FolderView property of Image Uploader at the
If you use a drop-down menu implemented via DHTML (without the SELECT element), you may encounter a problem with Z-order: if the drop-down menu overlaps with Image Uploader (or another ActiveX control), it will be drawn underneath this control. This happens because Internet Explorer always displays ActiveX controls as topmost elements. For this reason make sure that the drop-down menu has enough space to be expanded without overlapping with Image Uploader.
If you allow the user to switch between the view modes using not only the HTML control, but also the context menu of Image Uploader, you should also handle this situation. The SELECT element or other control you use should be updated if the user selects another view from the right-click menu. For that, the ViewChange event is exposed. It is raised when the view mode is changed. Just set a required value according to the FolderView property in the ViewChange event handler.
The code example is presented below. If you do not want to have any of the view modes, just remove an appropriate option.