ImageBox: Difference between revisions
New page: == Image Box == ===What is it? === ===Adding Image Box to your Application=== For instruction on how to add an Image Box to your application, please visit here. |
m Changed FunctionMode to FunctionalMode |
||
(15 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
== Image Box == | == 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 simple 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 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. | |||
==== 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. | |||
[[image:ImageBox_LineAndCircle1.PNG| 300px| center | thumb]] | |||
==== 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, | |||
<source lang=csharp> | |||
#if DEBUG | |||
imageBox1.FunctionalMode = ImageBox.FunctionalModeOption.Everything; | |||
#else | |||
imageBox1.FunctionalMode = ImageBox.FunctionalModeOption.PanAndZoom; | |||
#endif | |||
</source> | |||
===Adding Image Box to your Application=== | ===Adding Image Box to your Application=== | ||
For instruction on how to add an Image Box to your application, please visit [[Add ImageBox Control | here]]. | For instruction on how to add an Image Box to your application, please visit [[Add ImageBox Control | here]]. |
Latest revision as of 06:24, 8 February 2012
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 simple 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 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.
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.FunctionalMode = ImageBox.FunctionalModeOption.Everything;
#else
imageBox1.FunctionalMode = 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.