Files
NativeScript/tests/app/ui/image/image.md
Panayot Cankov e135c20b14 Rename the files
2016-05-26 14:30:25 +03:00

1.2 KiB

nav-title, title, description, previous_url
nav-title title description previous_url
Image How-To image Examples for using Image /ApiReference/ui/image/HOW-TO

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>

Creating an image and setting its source

Creating an image and setting its src

Creating an image and setting its src to a file within the application

Creating an image and setting its src to Data URI

Setting image stretching