ImagePicker Component


Properties

backgroundColor
  Specifies the ImagePicker's background color as an red-green-blue-alpha RRGGBBAA or red-green-blue RRGGBB string. If an Image has been set, the color change will not be visible until the Image is removed.
Data type: color
Designer Writable true <imagepicker name="imagepickerName" backgroundColor="FFb78895">
Code Writeable true imagepickerName.backgroundColor = "FFb78895"
Code Readable true let variable = imagepickerName.backgroundColor

enabled
  Specifies whether the ImagePicker should be active and clickable.
Data type: boolean
Designer Writable true <imagepicker name="imagepickerName" enabled="true">
Code Writeable true imagepickerName.enabled = true
Code Readable true let variable = imagepickerName.enabled

fontBold
  Specifies whether the text of the ImagePicker should be bold. Some fonts do not support bold.
Data type: boolean
Designer Writable true <imagepicker name="imagepickerName" fontBold="true">
Code Writeable true imagepickerName.fontBold = true
Code Readable true let variable = imagepickerName.fontBold

fontItalic
  Specifies whether the text of the ImagePicker should be italic. Some fonts do not support italic.
Data type: boolean
Designer Writable true <imagepicker name="imagepickerName" fontItalic="true">
Code Writeable true imagepickerName.fontItalic = true
Code Readable true let variable = imagepickerName.fontItalic

fontSize
  Specifies the text font size of the ImagePicker, measured in sp(scale-independent pixels).
Data type: number
Designer Writable true <imagepicker name="imagepickerName" fontSize="0">
Code Writeable true imagepickerName.fontSize = 0
Code Readable true let variable = imagepickerName.fontSize

fontTypeface
  Specifies the text font face of the ImagePicker as 'serif', 'sans serif', or 'monospace'.
Data type: string
Designer Writable true <imagepicker name="imagepickerName" fontTypeface="monospace">
Code Writeable false
Code Readable false

height
  Specifies the ImagePicker's vertical height, measured in pixels.
Data type: number
Designer Writable false
Code Writeable true imagepickerName.height = 200
Code Readable true let variable = imagepickerName.height

heightPercent
  Specifies the ImagePicker's vertical height as a percentage of the Screen's Height.
Data type: number
Designer Writable false
Code Writeable true imagepickerName.heightPercent = "25%"
Code Readable false

image
  Specifies the path of the ImagePicker's image. If there is both an Image and a BackgroundColor specified, only the Image will be visible.
Data type: string
Designer Writable true <imagepicker name="imagepickerName" image="cat.png">
Code Writeable true imagepickerName.image = "cat.png"
Code Readable true let variable = imagepickerName.image

selection
  Path to the file containing the image that was selected.
Data type: string
Designer Writable false
Code Writeable false
Code Readable true let variable = imagepickerName.selection

shape
  Specifies the shape of the ImagePicker. The valid values for this property are 'round', 'rectangle' and 'oval'. The Shape will not be visible if an Image is used.
Data type: string
Designer Writable true <imagepicker name="imagepickerName" shape="round">
Code Writeable false
Code Readable false

showFeedback
  Specifies if a visual feedback should be shown when a ImagePicker with an assigned Image is pressed.
Data type: boolean
Designer Writable true <imagepicker name="imagepickerName" showFeedback="true">
Code Writeable true imagepickerName.showFeedback = true
Code Readable true let variable = imagepickerName.showFeedback

text
  Specifies the text displayed by the ImagePicker.
Data type: string
Designer Writable true <imagepicker name="imagepickerName" text="Test text">
Code Writeable true imagepickerName.text = "Test text"
Code Readable true let variable = imagepickerName.text

textAlignment
  Specifies the alignment of the ImagePicker's text. Valid values are 'left', 'right' and 'center'.
Data type: string
Designer Writable true <imagepicker name="imagepickerName" textAlignment="center">
Code Writeable false
Code Readable false

textColor
  Specifies the text color of the ImagePicker as an red-green-blue-alpha RRGGBBAA or red-green-blue RRGGBB string.
Data type: color
Designer Writable true <imagepicker name="imagepickerName" textColor="FF0d8b8f">
Code Writeable true imagepickerName.textColor = "FF0d8b8f"
Code Readable true let variable = imagepickerName.textColor

visible
  Specifies whether the ImagePicker should be visible on the screen. Value is true{
Data type: boolean
Designer Writable true <imagepicker name="imagepickerName" visible="true">
Code Writeable true imagepickerName.visible = true
Code Readable true let variable = imagepickerName.visible

width
  Specifies the horizontal width of the ImagePicker, measured in pixels.
Data type: number
Designer Writable false
Code Writeable true imagepickerName.width = 300
Code Readable true let variable = imagepickerName.width

widthPercent
  Specifies the horizontal width of the ImagePicker as a percentage of the Screen's Width.
Data type: number
Designer Writable false
Code Writeable true imagepickerName.widthPercent = "45%"
Code Readable false

class
  The styling class of the the component
Data type: string
Designer Writable true <imagepicker name="imagepickerName" class="Test class">
Code Writeable false
Code Readable false

id
  The styling id of the the component
Data type: string
Designer Writable true <imagepicker name="imagepickerName" id="Test id">
Code Writeable false
Code Readable false

name
  The name of the component that will be used to refer to it in code.
Data type: string
Designer Writable true <imagepicker name="imagepickerName" name="testComponent">
Code Writeable false
Code Readable false

Methods

Method name Description Parameters
open Opens the ImagePicker, as though the user clicked on it.
imagepickerName.open()
addEventListener Method used to create event listeners.
See Events below for samples.
eventName string
eventCallbackFunction callback

Events

Event name Description Parameters
afterPicking Event to be raised after the ImagePicker activity returns its result and the properties have been filled in.
imagepickerName.addEventListener(
    "afterPicking",
    function () {
        //Your code here
    }
)
beforePicking Event to raise when the ImagePicker is clicked or the picker is shown using the Open method. This event occurs before the picker is displayed, and can be used to prepare the picker before it is shown.
imagepickerName.addEventListener(
    "beforePicking",
    function () {
        //Your code here
    }
)
gotFocus Indicates the cursor moved over the ImagePicker so it is now possible to click it.
imagepickerName.addEventListener(
    "gotFocus",
    function () {
        //Your code here
    }
)
lostFocus Indicates the cursor moved away from the ImagePicker so it is now no longer possible to click it.
imagepickerName.addEventListener(
    "lostFocus",
    function () {
        //Your code here
    }
)
touchDown Indicates that the ImagePicker was pressed down.
imagepickerName.addEventListener(
    "touchDown",
    function () {
        //Your code here
    }
)
touchUp Indicates that the ImagePicker has been released.
imagepickerName.addEventListener(
    "touchUp",
    function () {
        //Your code here
    }
)