@@ -30,6 +30,7 @@ export class TabStripItem extends View implements TabStripItemDefinition, AddChi
3030
3131 private _title : string ;
3232 private _iconSource : string ;
33+ private _iconClass : string ;
3334
3435 private _highlightedHandler : ( ) => void ;
3536 private _normalHandler : ( ) => void ;
@@ -59,6 +60,22 @@ export class TabStripItem extends View implements TabStripItemDefinition, AddChi
5960 }
6061 }
6162
63+ get iconClass ( ) : string {
64+ if ( this . isLoaded ) {
65+ return this . image . className ;
66+ }
67+
68+ return this . _iconClass ;
69+ }
70+
71+ set iconClass ( value : string ) {
72+ this . _iconClass = value ;
73+
74+ if ( this . isLoaded ) {
75+ this . image . className = value ;
76+ }
77+ }
78+
6279 get iconSource ( ) : string {
6380 if ( this . isLoaded ) {
6481 return this . image . src ;
@@ -79,6 +96,7 @@ export class TabStripItem extends View implements TabStripItemDefinition, AddChi
7996 if ( ! this . image ) {
8097 const image = new Image ( ) ;
8198 image . src = this . iconSource ;
99+ image . className = this . iconClass ;
82100 this . image = image ;
83101 this . _addView ( this . image ) ;
84102 }
@@ -176,6 +194,7 @@ export class TabStripItem extends View implements TabStripItemDefinition, AddChi
176194 if ( value instanceof Image ) {
177195 this . image = < Image > value ;
178196 this . iconSource = ( < Image > value ) . src ;
197+ this . iconClass = ( < Image > value ) . className ;
179198 this . _addView ( value ) ;
180199 // selectedIndexProperty.coerce(this);
181200 }
0 commit comments