ImageBox is a user control that is similar to PictureBox. Instead of displaying Bitmap, it display any Image<,> object. It also provides extra functionality for simple image manipulation.
The ImageBox has a FunctionalMode property, which allow you to configure how image should be displayed in ImageBox.
Under this configuration, ImageBox is similar as PictureBox. All advanced features will be disabled.
This configuration enable the following mouse binding
- Zoom-in and zoom-out by scrolling the middle mouse button.
- Hold down the middle mouse button to pan image
- Zoom-in to a specific region by highlighting a selected region using the left mouse button.
This configuration enable the right click menu. Where you can test out simple image filters on the image, as well as displaying image color histogram. I will give an example using the Line and Circle detection Example, where the result is displayed using an ImageBox. Move your mouse over to the image and right click, a context menu with available operations will be displayed.
This is the default configuration. It is basically PanAndZoom plus RightClickMenu
If you are developing commercial applications, you might want to have right click menu during development but not in the release mode for end users. This can be easily done by using the following code,
#if DEBUG imageBox1.FunctionMode = ImageBox.FunctionalModeOption.Everything; #else imageBox1.FunctionMode = ImageBox.FunctionalModeOption.PanAndZoom; #endif
Adding Image Box to your Application
For instruction on how to add an Image Box to your application, please visit here.