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, IDynamicResourceHandler, IElement, INameScope, IElementController, System.IDisposable, IResourcesProvider
- Inheritance
-
- Derived
-
- Implements
-
Constructors
View Source
ImageView()
Creates an initialized ImageView.
Declaration
API Level: 3
View Source
ImageView(Boolean)
Creates an initialized ImageView with setting the status of shown or hidden.
Declaration
public ImageView(bool shown)
Parameters
Type |
Name |
Description |
Boolean |
shown |
false : Not displayed (hidden), true : displayed (shown)
|
View Source
ImageView(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
View Source
ImageView(String, Boolean)
Creates an initialized ImageView from a URL to an image resource with setting shown or hidden.
Declaration
public ImageView(string url, bool shown)
Parameters
Type |
Name |
Description |
String |
url |
The URL of the image resource to display.
|
Boolean |
shown |
false : Not displayed (hidden), true : displayed (shown)
|
Declaration
public ImageView(ViewStyle viewStyle)
Parameters
Fields
Declaration
public static readonly BindableProperty AdjustViewSizeProperty
Field Value
Declaration
public static readonly BindableProperty AlphaMaskURLProperty
Field Value
Declaration
public static readonly BindableProperty BorderOnlyProperty
Field Value
Declaration
public static readonly BindableProperty BorderProperty
Field Value
Declaration
public static readonly BindableProperty CropToMaskProperty
Field Value
Declaration
public static readonly BindableProperty DesiredHeightProperty
Field Value
Declaration
public static readonly BindableProperty DesiredWidthProperty
Field Value
View Source
FastTrackUploadingProperty
FastTrackUploadingProperty
Declaration
public static readonly BindableProperty FastTrackUploadingProperty
Field Value
Declaration
public static readonly BindableProperty FittingModeProperty
Field Value
Declaration
public static readonly BindableProperty ImageColorProperty
Field Value
Declaration
public static readonly BindableProperty ImageMapProperty
Field Value
Declaration
public static readonly BindableProperty ImageProperty
Field Value
Declaration
public static readonly BindableProperty MaskingModeProperty
Field Value
Declaration
public static readonly BindableProperty OrientationCorrectionProperty
Field Value
Declaration
public static readonly BindableProperty PixelAreaProperty
Field Value
Declaration
public static readonly BindableProperty PlaceHolderUrlProperty
Field Value
Declaration
public static readonly BindableProperty PreMultipliedAlphaProperty
Field Value
Declaration
public static readonly BindableProperty ReleasePolicyProperty
Field Value
Declaration
public static readonly BindableProperty ResourceUrlProperty
Field Value
Declaration
public static readonly BindableProperty SynchronosLoadingProperty
Field Value
Declaration
public static readonly BindableProperty SynchronousLoadingProperty
Field Value
Declaration
public static readonly BindableProperty TransitionEffectProperty
Field Value
Declaration
public static readonly BindableProperty WrapModeUProperty
Field Value
Declaration
public static readonly BindableProperty WrapModeVProperty
Field Value
Properties
View Source
AdjustViewSize
Gets or sets the mode to adjust view size to preserve the aspect ratio of the image resource.
Declaration
public bool AdjustViewSize { get; set; }
Property Value
API Level: 9
View Source
AlphaMaskURL
Gets or sets the URL of the alpha mask.
Optional.
Declaration
public string AlphaMaskURL { get; set; }
Property Value
API Level: 6
View Source
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
public Rectangle Border { get; set; }
Property Value
API Level: 3
View Source
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
public bool BorderOnly { get; set; }
Property Value
API Level: 3
View Source
CropToMask
Whether to crop image to mask or scale mask to fit image.
Declaration
public bool CropToMask { get; set; }
Property Value
API Level: 6
View Source
DesiredHeight
Gets or sets the desired image height.
If not specified, the actual image height is used.
For normal quad images only.
Optional.
Declaration
public int DesiredHeight { get; set; }
Property Value
API Level: 6
View Source
DesiredWidth
Gets or sets the desired image width.
If not specified, the actual image width is used.
For normal quad images only.
Optional.
Declaration
public int DesiredWidth { get; set; }
Property Value
API Level: 6
View Source
FastTrackUploading
Gets or sets whether to apply fast track uploading or not.
Declaration
public bool FastTrackUploading { get; set; }
Property Value
View Source
FittingMode
Gets or sets fitting options used when resizing images to fit.
If not supplied, the default is FittingModeType.Fill.
For normal quad images only.
Optional.
Declaration
public FittingModeType FittingMode { get; set; }
Property Value
API Level: 6
View Source
Image
ImageView Image, type PropertyMap: string if it is a URL, map otherwise.
Declaration
public PropertyMap Image { get; set; }
Property Value
Examples
The following example demonstrates how to use the Image property.
PropertyMap map = new PropertyMap();
map.Insert(Visual.Property.Type, new PropertyValue((int)Visual.Type.Image));
map.Insert(ImageVisualProperty.AlphaMaskURL, new PropertyValue(url));
map.Insert(ImageVisualProperty.FittingMode, new PropertyValue((int)FittingModeType.ScaleToFill);
imageview.Image = map;
API Level: 4
View Source
ImageColor
The mixed color value for the image.
Declaration
public Color ImageColor { get; set; }
Property Value
Examples
This way is recommended for setting the property
var imageView = new ImageView();
imageView.ImageColor = new Color(0.5f, 0.1f, 0.0f, 1.0f);
This way to set the property is prohibited
imageView.ImageColor.R = 0.5f; //This does not guarantee a proper operation
View Source
ImageMap
This will be deprecated, Use Image instead.
ImageView ImageMap, type PropertyMap: string if it is a URL, map otherwise.
Declaration
public PropertyMap ImageMap { get; set; }
Property Value
API Level: 3
View Source
LoadingStatus
Gets the loading state of the visual resource.
Declaration
public ImageView.LoadingStatusType LoadingStatus { get; }
Property Value
API Level: 5
View Source
MaskingMode
Gets or sets whether to apply mask on GPU or not.
Declaration
public ImageView.MaskingModeType MaskingMode { get; set; }
Property Value
View Source
OrientationCorrection
Gets or sets whether to automatically correct the orientation of an image.
Declaration
public bool OrientationCorrection { get; set; }
Property Value
API Level: 5
View Source
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
public RelativeVector4 PixelArea { get; set; }
Property Value
API Level: 3
View Source
PlaceHolderUrl
ImageView PlaceHolderUrl, 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 PlaceHolderUrl { get; set; }
Property Value
API Level: 11
View Source
PreMultipliedAlpha
ImageView PreMultipliedAlpha, type Boolean.
Image must be initialized.
Declaration
public bool PreMultipliedAlpha { get; set; }
Property Value
API Level: 3
View Source
ReleasePolicy
Gets or sets ReleasePolicy for image.
If not supplied, the default is ReleasePolicyType.Detached.
Declaration
public ReleasePolicyType ReleasePolicy { get; set; }
Property Value
View Source
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
public string ResourceUrl { get; set; }
Property Value
API Level: 3
View Source
SynchronosLoading
Gets or sets whether to synchronous loading the resourceurl of image.
Declaration
public bool SynchronosLoading { get; set; }
Property Value
API Level: 3
View Source
SynchronousLoading
Gets or sets whether the image of the ResourceUrl property will be loaded synchronously.
Declaration
public bool SynchronousLoading { get; set; }
Property Value
API Level: 9
View Source
TransitionEffect
Gets or sets whether the image use TransitionEffect or not
Declaration
public bool TransitionEffect { get; set; }
Property Value
API Level: 11
View Source
WrapModeU
Gets or sets the wrap mode for the u coordinate.
It decides how the texture should be sampled when the u coordinate exceeds the range of 0.0 to 1.0.
If not specified, the default is WrapModeType.Default(CLAMP).
For normal quad images only.
Optional.
Declaration
public WrapModeType WrapModeU { get; set; }
Property Value
API Level: 6
View Source
WrapModeV
Gets or sets the wrap mode for the v coordinate.
It decides how the texture should be sampled when the v coordinate exceeds the range of 0.0 to 1.0.
The first two elements indicate the top-left position of the area, and the last two elements are the areas of the width and the height respectively.
If not specified, the default is WrapModeType.Default(CLAMP).
For normal quad images only.
Optional.
Declaration
public WrapModeType WrapModeV { get; set; }
Property Value
API Level: 6
Methods
Declaration
protected override bool CheckResourceReady()
Returns
Overrides
View Source
CreateViewStyle()
Get attributes, it is abstract function and must be override.
Declaration
protected override ViewStyle CreateViewStyle()
Returns
Overrides
View Source
Dispose(DisposeTypes)
you can override it to clean-up your own resources.
Declaration
protected override void Dispose(DisposeTypes type)
Parameters
Overrides
API Level: 3
View Source
DownCast(BaseHandle)
Downcasts a handle to imageView handle.
Declaration
public static ImageView DownCast(BaseHandle handle)
Parameters
Returns
API Level: 3
View Source
GetCachedImageVisualProperty(Int32)
Get image visual property from NUI cached image map by key.
If there is no matched value, return null.
Declaration
protected virtual PropertyValue GetCachedImageVisualProperty(int key)
Parameters
Type |
Name |
Description |
Int32 |
key |
|
Returns
View Source
GetImageVisualProperty(Int32)
Get image visual property by key.
If we found value in local Cached result, return that.
Else, get synced native map and return that.
If there is no matched value, return null.
Declaration
protected virtual PropertyValue GetImageVisualProperty(int key)
Parameters
Type |
Name |
Description |
Int32 |
key |
|
Returns
View Source
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
public bool IsResourceReady()
Returns
API Level: 3
View Source
MergeCachedImageVisualProperty(PropertyMap)
Update NUI cached image visual property map by inputed property map.
Declaration
protected virtual void MergeCachedImageVisualProperty(PropertyMap map)
Parameters
Declaration
API Level: 5
View Source
Play()
Plays the animated GIF. This is also the default playback mode.
Declaration
API Level: 5
View Source
ReleaseSwigCPtr(Runtime.InteropServices.HandleRef)
Declaration
protected override void ReleaseSwigCPtr(Runtime.InteropServices.HandleRef swigCPtr)
Parameters
Type |
Name |
Description |
Tizen.System.Runtime.InteropServices.HandleRef |
swigCPtr |
|
Overrides
View Source
Reload()
Forcefully reloads the image. All the visuals using this image will reload to the latest image.
Declaration
API Level: 5
View Source
SetImage(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
Declaration
API Level: 5
View Source
UpdateImage()
Update image-relative properties synchronously.
After call this API, All image properties updated.
Declaration
protected virtual void UpdateImage()
View Source
UpdateImage(Int32, PropertyValue, Boolean)
Lazy call to UpdateImage.
Collect Properties need to be update, and set properties that starts the Processing.
If you want to update cachedImagePropertyMap, but don't want to request new visual creation, make requiredVisualCreation value as false.
(Example : if we change SynchronousLoading property from 'true' to 'false', or if we call this function during UpdateImage)
Declaration
protected virtual void UpdateImage(int key, PropertyValue value, bool requiredVisualCreation = true)
Parameters
Events
View Source
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
public event EventHandler<ImageView.ResourceReadyEventArgs> ResourceReady
Event Type
API Level: 3
Implements
Extension Methods