How do I conditionally format a WPF TextBlock?
Posted
by Scott Ferguson
on Stack Overflow
See other posts from Stack Overflow
or by Scott Ferguson
Published on 2010-04-26T23:46:14Z
Indexed on
2010/04/27
0:03 UTC
Read the original article
Hit count: 323
I have a WPF TextBlock bound to a string. If that string is empty, I want the TextBlock to display a warning message in another colour.
This is easy to do in code, I was wondering if there was a elegant WPF pure XAML solution for it? I have investigated Style Triggers, but the syntax doesn't come naturally to me.
Thanks!
© Stack Overflow or respective owner