ImageBox: Difference between revisions
No edit summary |
mNo edit summary |
||
Line 24: | Line 24: | ||
This is the default configuration. It is basically PanAndZoom plus RightClickMenu | This is the default configuration. It is basically PanAndZoom plus RightClickMenu | ||
==== | ====Recommended Configuration==== | ||
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 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, | ||
<source lang=csharp> | <source lang=csharp> |
Revision as of 01:48, 15 July 2009
Image Box
Introduction
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 image manipulation.
Functional Mode
The ImageBox has a FunctionalMode property, which allow you to configure how image should be displayed in ImageBox.
Minimum
Under this configuration, ImageBox is similar as PictureBox. All advanced features will be disabled.
PanAndZoom
This configuration enable the following mouse binding
- Zoom-in and zoom-out using the middle button of the mouse
- Holding the middle button of the mouse to pan image
- Zoom-in to a specific region by highlighting a selected region using the left mouse button.
RightClickMenu
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.
Everything
This is the default configuration. It is basically PanAndZoom plus RightClickMenu
Recommended Configuration
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.