The PageView control provides properties that can be used to enable file drag-and-drop onto the control to trigger their loading. The base property to enable drag-and-drop support is the DragDropOpen property. File handling behavior is then controlled by the following set of properties:
By default, these are configured to only open images, only page 0 of multi-page documents, and create a new ImGearPresentationPageDisplay object for the image. The FileOpening and FileOpened events provide further control of file loading.
- The FileOpening event allows you to change the opening options immediately before opening a file, based on the specific file. It also allows cancelling the default file opening, and opening the file in another way, if desired.
- The FileOpened event allows you to get information about how the file was opened. This is especially useful to have the application respond to the new image being loaded and to update other parts of the application based on the new image, annotations, or document that was opened.