0

I want to apply different color for my text(single word). For example, please consider the below word,

"Customer Text"

In the above word, I need to apply one color to "Customer" and need to apply another color (other than the first text color) to "Text".

Is it achievable in Xamarin.Forms?

Thanks in advance.

Divakar
  • 514
  • 1
  • 9
  • 25
  • 5
    Possible duplicate of [How to make a Label display a FormattedString with letters of different color?](http://stackoverflow.com/questions/42056978/how-to-make-a-label-display-a-formattedstring-with-letters-of-different-color) – SushiHangover Feb 07 '17 at 12:43
  • Its working in a simple Label.But the same code not working if I load that Label inside a DataTemplate. Any advice? – Divakar Feb 07 '17 at 13:33
  • 2
    Post a new question with your label's `DataTemplate` – SushiHangover Feb 07 '17 at 13:50
  • I believe the link to the duplicate question addresses that issue. Look at the 6th comment under the opening question (click "See more" to see all of the comments). – jgoldberger - MSFT Feb 22 '17 at 00:05

2 Answers2

1

I have achieved my requirement by using the way mentioned in the link, How to make a Label display a FormattedString with letters of different color?

Community
  • 1
  • 1
Divakar
  • 514
  • 1
  • 9
  • 25
0

use the propertychanged event and check if the changed property is text then you can do whatever you want when Text Property change or any property change.