Image Control

Model

IImageModel.png

type: string - type of the control. Use "image" to declare an Image control.

name?: string (optional) - name of the control. In javascript code, a child control is accessible from its parent control by name. In HTML, the value is put into the name attribute of the element.

cssClass?: string (optional) - custom CSS class that will be applied to the control's outer element.

isHidden?: boolean (optional) - allows to declare control as hidden.

bindsTo?: string (optional) - path of the property that the control will be databound to.

alternateText?: string (optional) - alternate text. In HTML, the value is put into the alt attribute of the img element.

width?: number (optional) - image width. In HTML, the value is put into the width attribute of the img element.

height?: number (optional) - image height. In HTML, the value is put into the height attribute of the img element.

source?: string(optional) - image source uri. In HTML, the value is put into the src attribute of the img element.

Example

{
	"name": "userImage",
	"type": "image",
	"alternateText": "User Image",
	"width": 64,
	"height": 64,
	"source": "/resources/user.png"
}

Control

IImage.png

model: IControlModel - reference to the model.

id: string - control id. Returns value of the id attribute of the element.

type: string - type of the control.

name: string - name of the control.

parent: IControl - reference to the parent control.

window: IWindow - reference to the window that owns the control.

bindingContext: any - reference to the object that the control is bound to.

getElement(): JQuery - returns the HTML element that represents the control.

bind(dataObject: any): void - binds the control to the data model.

Image Control Example


.

Last edited Nov 20, 2013 at 10:44 AM by artemkv, version 4

Comments

No comments yet.