Class ImageView
Definition
- Namespace:
- Tizen.NUI.BaseComponents
- Assembly:
- Tizen.NUI.dll
- API Level:
- 3
ImageView is a class for displaying an image resource.
An instance of ImageView can be created using a URL or an image instance.
public class ImageView : View, INotifyPropertyChanged, IDynamicResourceHandler, IElement, INameScope, IElementController, IDisposable, IResourcesProvider
- Inheritance
-
Tizen.NUI.Binding.BindableObjectTizen.NUI.Binding.ElementImageView
- Derived
- Implements
Constructors
View SourceImageView()
Creates an initialized ImageView.
Declaration
public ImageView()
API Level: 3
View SourceImageView(String)
Creates an initialized ImageView from a URL to an image resource.
If the string is empty, ImageView will not display anything.
Declaration
public ImageView(string url)
Parameters
Type | Name | Description |
---|---|---|
String | url | The URL of the image resource to display. |
API Level: 3
Properties
View SourceBorder
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
public 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.
API Level: 3
View SourceBorderOnly
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
public bool BorderOnly { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: 3
View SourceCropToMask
Whether to crop image to mask or scale mask to fit image.
Declaration
public bool CropToMask { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: 6
View SourceImage
ImageView Image, type PropertyMap
Declaration
public PropertyMap Image { get; set; }
Property Value
Type | Description |
---|---|
PropertyMap |
API Level: 4
View SourceLoadingStatus
Gets the loading state of the visual resource.
Declaration
public ImageView.LoadingStatusType LoadingStatus { get; }
Property Value
Type | Description |
---|---|
ImageView.LoadingStatusType |
API Level: 5
View SourceOrientationCorrection
Gets or sets whether to automatically correct the orientation of an image.
Declaration
public bool OrientationCorrection { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: 5
View SourcePixelArea
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
public 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.
API Level: 3
View SourcePreMultipliedAlpha
ImageView PreMultipliedAlpha, type Boolean.
Image must be initialized.
Declaration
public bool PreMultipliedAlpha { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: 3
View SourceResourceUrl
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
public string ResourceUrl { get; set; }
Property Value
Type | Description |
---|---|
String |
API Level: 3
View SourceSynchronosLoading
Gets or sets whether to synchronos loading the resourceurl of image.
Declaration
public bool SynchronosLoading { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: 3
Methods
View SourceDispose(DisposeTypes)
you can override it to clean-up your own resources.
Declaration
protected override void Dispose(DisposeTypes type)
Parameters
Type | Name | Description |
---|---|---|
DisposeTypes | type | DisposeTypes |
Overrides
API Level: 3
View SourceIsResourceReady()
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
public bool IsResourceReady()
Returns
Type | Description |
---|---|
Boolean |
API Level: 3
View SourcePause()
Pauses the animated GIF.
Declaration
public void Pause()
API Level: 5
View SourcePlay()
Plays the animated GIF. This is also the default playback mode.
Declaration
public void Play()
API Level: 5
View SourceReload()
Forcefully reloads the image. All the visuals using this image will reload to the latest image.
Declaration
public void Reload()
API Level: 5
View SourceSetImage(String)
Sets this ImageView from the given URL.
If the URL is empty, ImageView will not display anything.
Declaration
public void SetImage(string url)
Parameters
Type | Name | Description |
---|---|---|
String | url | The URL to the image resource to display. |
API Level: 3
View SourceStop()
Stops the animated GIF.
Declaration
public void Stop()
API Level: 5
Events
View SourceResourceReady
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
public event EventHandler<ImageView.ResourceReadyEventArgs> ResourceReady
Event Type
Type | Description |
---|---|
EventHandler<ImageView.ResourceReadyEventArgs> |