Files
NativeScript/apps/tests/ui/image/image.md
Erjan Gavalji f15f283c74 Reorder test file structure to match the modules
Needed to have a nice structured cookbook dir in the docs

Includes:
Move the data-module tests under the data dir
Move the frame tests under the ui dir
Rename the dialog.md file to dialogs.md
Fix the web-view title
Add previous_url attributes to each article for SEO
Rename the style dir to styling to match the reference
Fix the frame-tests path
2016-05-05 10:43:35 +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>

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.