Fixed issue 597.

This commit is contained in:
Nedyalko Nikolov
2015-10-20 14:21:21 +03:00
parent 03a741e4b1
commit 2f7cf84839
9 changed files with 166 additions and 6 deletions

View File

@@ -104,4 +104,8 @@ export class Button extends view.View implements definition.Button {
}
this.setFormattedTextPropertyToNative(data.newValue);
}
public _addChildFromBuilder(name: string, value: any): void {
formattedString.FormattedString.addFormattedStringToView(this, name, value);
}
}

10
ui/button/button.d.ts vendored
View File

@@ -10,7 +10,7 @@ declare module "ui/button" {
/**
* Represents a standard Button widget.
*/
export class Button extends view.View {
export class Button extends view.View implements formattedString.FormattedStringView, view.AddChildFromBuilder {
/**
* Represents the observable property backing the text property of each Button instance.
*/
@@ -53,5 +53,13 @@ declare module "ui/button" {
* Raised when a tap event occurs.
*/
on(event: "tap", callback: (args: observable.EventData) => void, thisArg?: any);
/**
* Called for every child element declared in xml.
* This method will add a child element (value) to current element.
* @param name - Name of the element.
* @param value - Value of the element.
*/
_addChildFromBuilder(name: string, value: any): void;
}
}