PhoneNumberPicker Component
Properties
backgroundColor Specifies the PhoneNumberPicker'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 |
<phonenumberpicker name="phonenumberpickerName" backgroundColor="FFc60133"> |
Code Writeable | true |
phonenumberpickerName.backgroundColor = "FFc60133" |
Code Readable | true |
let variable = phonenumberpickerName.backgroundColor |
contactName Returns the full name of the selected contact, or the empty string if a name is unavailable.
Data type: string |
||
Designer Writable | false | |
Code Writeable | false | |
Code Readable | true |
let variable = phonenumberpickerName.contactName |
contactUri Returns a URI that specifies the location of the contact on the device.
Data type: string |
||
Designer Writable | false | |
Code Writeable | false | |
Code Readable | true |
let variable = phonenumberpickerName.contactUri |
emailAddress Returns the primary email address of the selected contact, or the empty string if an email address is unavailable.
Data type: string |
||
Designer Writable | false | |
Code Writeable | false | |
Code Readable | true |
let variable = phonenumberpickerName.emailAddress |
emailAddressList Returns a list of email addresses associated with the selected contact.
Data type: array |
||
Designer Writable | false | |
Code Writeable | false | |
Code Readable | true |
let variable = phonenumberpickerName.emailAddressList |
enabled Specifies whether the PhoneNumberPicker should be active and clickable.
Data type: boolean |
||
Designer Writable | true |
<phonenumberpicker name="phonenumberpickerName" enabled="true"> |
Code Writeable | true |
phonenumberpickerName.enabled = true |
Code Readable | true |
let variable = phonenumberpickerName.enabled |
fontBold Specifies whether the text of the PhoneNumberPicker should be bold. Some fonts do not support bold.
Data type: boolean |
||
Designer Writable | true |
<phonenumberpicker name="phonenumberpickerName" fontBold="true"> |
Code Writeable | true |
phonenumberpickerName.fontBold = true |
Code Readable | true |
let variable = phonenumberpickerName.fontBold |
fontItalic Specifies whether the text of the PhoneNumberPicker should be italic. Some fonts do not support italic.
Data type: boolean |
||
Designer Writable | true |
<phonenumberpicker name="phonenumberpickerName" fontItalic="true"> |
Code Writeable | true |
phonenumberpickerName.fontItalic = true |
Code Readable | true |
let variable = phonenumberpickerName.fontItalic |
fontSize Specifies the text font size of the PhoneNumberPicker, measured in sp(scale-independent pixels).
Data type: number |
||
Designer Writable | true |
<phonenumberpicker name="phonenumberpickerName" fontSize="24"> |
Code Writeable | true |
phonenumberpickerName.fontSize = 24 |
Code Readable | true |
let variable = phonenumberpickerName.fontSize |
fontTypeface Specifies the text font face of the PhoneNumberPicker as 'serif', 'sans serif', or 'monospace'.
Data type: string |
||
Designer Writable | true |
<phonenumberpicker name="phonenumberpickerName" fontTypeface="monospace"> |
Code Writeable | false | |
Code Readable | false |
height Specifies the PhoneNumberPicker's vertical height, measured in pixels.
Data type: number |
||
Designer Writable | false | |
Code Writeable | true |
phonenumberpickerName.height = 180 |
Code Readable | true |
let variable = phonenumberpickerName.height |
heightPercent Specifies the PhoneNumberPicker's vertical height as a percentage of the Screen's Height.
Data type: number |
||
Designer Writable | false | |
Code Writeable | true |
phonenumberpickerName.heightPercent = 45 |
Code Readable | false |
image Specifies the path of the PhoneNumberPicker's image. If there is both an Image and a BackgroundColor specified, only the Image will be visible.
Data type: string |
||
Designer Writable | true |
<phonenumberpicker name="phonenumberpickerName" image="cat.png"> |
Code Writeable | true |
phonenumberpickerName.image = "cat.png" |
Code Readable | true |
let variable = phonenumberpickerName.image |
phoneNumber Returns the primary phone number associated with the selected contact, or the empty string if no phone number is associated with the contact.
Data type: string |
||
Designer Writable | false | |
Code Writeable | false | |
Code Readable | true |
let variable = phonenumberpickerName.phoneNumber |
phoneNumberList Returns a list of phone numbers associated with the selected contact.
Data type: array |
||
Designer Writable | false | |
Code Writeable | false | |
Code Readable | true |
let variable = phonenumberpickerName.phoneNumberList |
picture Returns a picture URI for the selected contact, which can be used to retrieve the contact's photo and other fields.
Data type: string |
||
Designer Writable | false | |
Code Writeable | false | |
Code Readable | true |
let variable = phonenumberpickerName.picture |
shape Specifies the shape of the PhoneNumberPicker. 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 |
<phonenumberpicker name="phonenumberpickerName" shape="oval"> |
Code Writeable | false | |
Code Readable | false |
showFeedback Specifies if a visual feedback should be shown when a PhoneNumberPicker with an assigned Image is pressed.
Data type: boolean |
||
Designer Writable | true |
<phonenumberpicker name="phonenumberpickerName" showFeedback="true"> |
Code Writeable | true |
phonenumberpickerName.showFeedback = true |
Code Readable | true |
let variable = phonenumberpickerName.showFeedback |
text Specifies the text displayed by the PhoneNumberPicker.
Data type: string |
||
Designer Writable | true |
<phonenumberpicker name="phonenumberpickerName" text="Test text"> |
Code Writeable | true |
phonenumberpickerName.text = "Test text" |
Code Readable | true |
let variable = phonenumberpickerName.text |
textAlignment Specifies the alignment of the PhoneNumberPicker's text. Valid values are 'left', 'right' and 'center'.
Data type: string |
||
Designer Writable | true |
<phonenumberpicker name="phonenumberpickerName" textAlignment="center"> |
Code Writeable | false | |
Code Readable | false |
textColor Specifies the text color of the PhoneNumberPicker as an red-green-blue-alpha RRGGBBAA or red-green-blue RRGGBB string.
Data type: color |
||
Designer Writable | true |
<phonenumberpicker name="phonenumberpickerName" textColor="FF2abd44"> |
Code Writeable | true |
phonenumberpickerName.textColor = "FF2abd44" |
Code Readable | true |
let variable = phonenumberpickerName.textColor |
visible Specifies whether the PhoneNumberPicker should be visible on the screen. Value is true{
Data type: boolean |
||
Designer Writable | true |
<phonenumberpicker name="phonenumberpickerName" visible="true"> |
Code Writeable | true |
phonenumberpickerName.visible = true |
Code Readable | true |
let variable = phonenumberpickerName.visible |
width Specifies the horizontal width of the PhoneNumberPicker, measured in pixels.
Data type: number |
||
Designer Writable | false | |
Code Writeable | true |
phonenumberpickerName.width = 320 |
Code Readable | true |
let variable = phonenumberpickerName.width |
widthPercent Specifies the horizontal width of the PhoneNumberPicker as a percentage of the Screen's Width.
Data type: number |
||
Designer Writable | false | |
Code Writeable | true |
phonenumberpickerName.widthPercent = 85 |
Code Readable | false |
class The styling class of the the component
Data type: string |
||
Designer Writable | true |
<phonenumberpicker name="phonenumberpickerName" class="Test class"> |
Code Writeable | false | |
Code Readable | false |
id The styling id of the the component
Data type: string |
||
Designer Writable | true |
<phonenumberpicker name="phonenumberpickerName" 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 |
<phonenumberpicker name="phonenumberpickerName" name="testComponent"> |
Code Writeable | false | |
Code Readable | false |
Methods
Method name | Description | Parameters | ||||
---|---|---|---|---|---|---|
open |
Opens the PhoneNumberPicker, as though the user clicked on it. phonenumberpickerName.open() |
|
||||
viewContact |
Opens the selected contact's entry in the device's default Contacts app. phonenumberpickerName.viewContact(uri) phonenumberpickerName.viewContact(Test uri) |
|
||||
addEventListener |
Method used to create event listeners. See Events below for samples. |
|
Events
Event name | Description | Parameters |
---|---|---|
afterPicking | Event to be raised after the PhoneNumberPicker activity returns its result and the properties have been filled in.phonenumberpickerName.addEventListener( "afterPicking", function () { //Your code here } ) |
|
beforePicking | Event to raise when the PhoneNumberPicker 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.phonenumberpickerName.addEventListener( "beforePicking", function () { //Your code here } ) |
|
gotFocus | Indicates the cursor moved over the PhoneNumberPicker so it is now possible to click it.phonenumberpickerName.addEventListener( "gotFocus", function () { //Your code here } ) |
|
lostFocus | Indicates the cursor moved away from the PhoneNumberPicker so it is now no longer possible to click it.phonenumberpickerName.addEventListener( "lostFocus", function () { //Your code here } ) |
|
touchDown | Indicates that the PhoneNumberPicker was pressed down.phonenumberpickerName.addEventListener( "touchDown", function () { //Your code here } ) |
|
touchUp | Indicates that the PhoneNumberPicker has been released.phonenumberpickerName.addEventListener( "touchUp", function () { //Your code here } ) |
|