Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

TextBlock dynamic binding

$
0
0

I have a WPF TextBlock bound to a string using Dynamic resourse. If that string is null, I want the TextBlock to display binding value.

<TextBlock  Text="{DynamicResource keyState}" >

if keyState=null, i want to display "keyState" as text.

Is there anyway to implement this in XAML?

Thanks in advance.


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>