Files
NativeScript/apps/tests/ui/image/image.md
2016-05-02 10:45:50 +03:00

1.1 KiB

nav-title, title, description
nav-title title description
Image How-To image Examples for using Image

Image

Using an image requires the Image module to be loaded.

Binding the image source property to a view-model property.

<Page>
  <StackLayout>
     <!--Bind the image source property to view-model property -->
     {%raw%}<Image src="{{ thumbnailImageUrl }}" />{%endraw%}
     <!--Load form image from application -->
     <Image src="~/logo.png" stretch ="none" / > 
     <!--Load form image resource -->
     <Image src="res://logo.png" stretch ="none" / > 
     <!--Load form image URL-->
     <Image src="http://www.google.com/images/errors/logo_sm_2.png" stretch ="none" /> 
  </StackLayout>
</Page>

How to create an image and set its source.

How to create an image and set its src.

How to create an image and set its src to file within the application.

How to create an image and set its src to Data URI.

How to set image stretching.