Change TextColor of TextBlock after creation
Closed this issue · 2 comments
charlenni commented
Hello,
first: thank you for this great project.
I have only one style in a TextBlock and want to change the TextColor of this text later. Is this possible? Or must I recreate the whole TextBlock?
Thank you for your help.
Best regards,
Dirk
toptensoftware commented
The text block only stores a reference to the passed in style. So if you're careful and only use that style instance with that one text block you can change it's color property and re-draw it and the new color will be used.
Note: you can provide your own implementation of IStyle if you want.
charlenni commented
Thank you for the fast answer. Works perfect!