Added tintColor property in Image view. It should be used instead of color

This commit is contained in:
Tsvetan Raikov
2016-09-15 19:19:22 +03:00
parent 6bae1716a7
commit 1b568b56ca
9 changed files with 56 additions and 25 deletions

View File

@ -41,6 +41,7 @@ declare module "ui/styling/style" {
public scaleX: number;
public scaleY: number;
public color: Color;
public tintColor: Color;
public placeholderColor: Color;
public backgroundColor: Color;
public backgroundImage: string;
@ -105,6 +106,7 @@ declare module "ui/styling/style" {
export var scaleXProperty: styleProperty.Property;
export var scaleYProperty: styleProperty.Property;
export var colorProperty: styleProperty.Property;
export var tintColorProperty: styleProperty.Property;
export var placeholderColorProperty: styleProperty.Property;
export var backgroundImageProperty: styleProperty.Property;
export var backgroundColorProperty: styleProperty.Property;

View File

@ -583,6 +583,13 @@ export class Style extends DependencyObservable implements styling.Style {
this._setValue(colorProperty, value);
}
get tintColor(): Color {
return this._getValue(tintColorProperty);
}
set tintColor(value: Color) {
this._setValue(tintColorProperty, value);
}
get placeholderColor(): Color {
return this._getValue(placeholderColorProperty);
}
@ -1061,6 +1068,10 @@ export var colorProperty = new styleProperty.Property("color", "color",
new PropertyMetadata(undefined, PropertyMetadataSettings.Inheritable, undefined, Color.isValid, Color.equals),
converters.colorConverter);
export var tintColorProperty = new styleProperty.Property("tintColor", "tint-color",
new PropertyMetadata(undefined, PropertyMetadataSettings.Inheritable, undefined, Color.isValid, Color.equals),
converters.colorConverter);
export var placeholderColorProperty = new styleProperty.Property("placeholderColor", "placeholder-color",
new PropertyMetadata(undefined, PropertyMetadataSettings.None, undefined, Color.isValid, Color.equals),
converters.colorConverter);

View File

@ -43,6 +43,11 @@
*/
color: color.Color;
/**
* A color used to tint template images.
*/
tintColor: color.Color;
/**
* Gets or sets the color of the placeholder element.
*/