Class ImageView
Definition
- Namespace:
- Tizen.NUI.BaseComponents
- Assembly:
- Tizen.NUI.dll
ImageView is a class for displaying an image resource.
An instance of ImageView can be created using a URL or an image instance.
C#Copypublic class ImageView : View, INotifyPropertyChanged, IDisposable
- Inheritance
-
objectTizen.NUI.Binding.BindableObjectTizen.NUI.Binding.ElementImageView
- Derived
- Implements
-
System.ComponentModel.INotifyPropertyChangedSystem.IDisposable
Constructors
Declaration
C#Copypublic ImageView()
ImageView(string)
Creates an initialized ImageView from a URL to an image resource.
If the string is empty, ImageView will not display anything.
Declaration
C#Copypublic ImageView(string url)
Parameters
Type | Name | Description |
---|---|---|
string | url | The URL of the image resource to display. |
Properties
Border
The border of the image in the order: left, right, bottom, top.
If set, ImageMap will be ignored.
For N-Patch images only.
Optional.
Declaration
C#Copypublic Rectangle Border { get; set; }
Property Value
Type | Description |
---|---|
Rectangle |
Remarks
The property cascade chaining set is possible. For example, this (imageView.Border.X = 1;) is possible.
BorderOnly
Gets or sets whether to draw the borders only (if true).
If not specified, the default is false.
For N-Patch images only.
Optional.
Declaration
C#Copypublic bool BorderOnly { get; set; }
Property Value
Type | Description |
---|---|
bool |
Declaration
C#Copypublic bool CropToMask { get; set; }
Property Value
Type | Description |
---|---|
bool |
Declaration
C#Copypublic PropertyMap Image { get; set; }
Property Value
Type | Description |
---|---|
PropertyMap |
Declaration
C#Copypublic ImageView.LoadingStatusType LoadingStatus { get; }
Property Value
Type | Description |
---|---|
ImageView.LoadingStatusType |
OrientationCorrection
Gets or sets whether to automatically correct the orientation of an image.
Declaration
C#Copypublic bool OrientationCorrection { get; set; }
Property Value
Type | Description |
---|---|
bool |
PixelArea
ImageView PixelArea, type Vector4 (Animatable property).
Pixel area is a relative value with the whole image area as [0.0, 0.0, 1.0, 1.0].
Declaration
C#Copypublic RelativeVector4 PixelArea { get; set; }
Property Value
Type | Description |
---|---|
RelativeVector4 |
Remarks
The property cascade chaining set is possible. For example, this (imageView.PixelArea.X = 0.1f;) is possible.
PreMultipliedAlpha
ImageView PreMultipliedAlpha, type Boolean.
Image must be initialized.
Declaration
C#Copypublic bool PreMultipliedAlpha { get; set; }
Property Value
Type | Description |
---|---|
bool |
ResourceUrl
ImageView ResourceUrl, type string. This is one of mandatory property. Even if not set or null set, it sets empty string ("") internally. When it is set as null, it gives empty string ("") to be read.
Declaration
C#Copypublic string ResourceUrl { get; set; }
Property Value
Type | Description |
---|---|
string |
Declaration
C#Copypublic bool SynchronosLoading { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
Declaration
C#Copyprotected override void Dispose(DisposeTypes type)
Parameters
Type | Name | Description |
---|---|---|
DisposeTypes | type | DisposeTypes |
Overrides
IsResourceReady()
Queries if all resources required by a control are loaded and ready.
Most resources are only loaded when the control is placed on the stage.
True if the resources are loaded and ready, false otherwise.
Declaration
C#Copypublic bool IsResourceReady()
Returns
Type | Description |
---|---|
bool |
Declaration
C#Copypublic void Pause()
Declaration
C#Copypublic void Play()
Reload()
Forcefully reloads the image. All the visuals using this image will reload to the latest image.
Declaration
C#Copypublic void Reload()
SetImage(string)
Sets this ImageView from the given URL.
If the URL is empty, ImageView will not display anything.
Declaration
C#Copypublic void SetImage(string url)
Parameters
Type | Name | Description |
---|---|---|
string | url | The URL to the image resource to display. |
Declaration
C#Copypublic void Stop()
Events
ResourceReady
An event for ResourceReady signal which can be used to subscribe or unsubscribe the event handler.
This signal is emitted after all resources required by a control are loaded and ready.
Most resources are only loaded when the control is placed on the stage.
Declaration
C#Copypublic event EventHandler<ImageView.ResourceReadyEventArgs> ResourceReady
Event Type
Type | Description |
---|---|
System.EventHandler<TEventArgs><ImageView.ResourceReadyEventArgs> |