ImageView
PUBLISHED
An image view is a NUI control that displays an image. It is implemented through the Tizen.NUI.BaseComponents.ImageView
class.
Figure: Image view example
Creating an Image View
To create an image view:
- Create an instance of the Tizen.NUI.BaseComponents.ImageView [2] class and define the image file as a parameter:
imageView = new ImageView(DirectoryInfo.Resource + "images/gallery-3.jpg");
You can also create the
Tizen.NUI.BaseComponents.ImageView
class instance separately and define the file path by setting itsResourceUrl
property:imageView = new ImageView(); imageView.ResourceUrl = DirectoryInfo.Resource + "images/gallery-3.jpg";
- To change the image path after the instance has been created, use the
SetImage()
method of theTizen.NUI.BaseComponents.ImageView
class:
imageView.SetImage(DirectoryInfo.Resource + "images/gallery-4.jpg");
Image View Properties
The following table defines the Tizen.NUI.BaseComponents.ImageView [2] class control properties.
Table: Image view control properties
Property | Type | Description |
---|---|---|
ResourceUrl |
string |
The file path of the Image. |
ImageMap |
Map |
Property map associated with a given image. |
PreMultipliedAlpha |
bool |
Whether the image is opacity-adjusted
If |
PixelArea |
Vector4 |
Image subarea defined with relative area values: x coordinate for the top-left corner, y coordinate for the top-left corner, width, and height. To set the subarea as the whole image area, use [0.0, 0.0, 1.0, 1.0] .
For example, on a 200 x 200 pixel image, the value
|
Border |
Rectangle |
Image border, specified in the following order: left, right, bottom, and top. For N-Patch images only. |
BorderOnly |
bool |
Whether to draw only the borders. For N-Patch images only. |
SynchronousLoading |
bool |
Whether the image is synchronous. For N-Patch images only. |