Live Chat Icon For mobile
Live Chat Icon

How do I bind a TextBlock to a resource string defined in the application’s resource1.resx file?

Platform: WPF| Category: TextBlock

If the resource string is named ‘CopyrightInfo’ for example, then you can bind it to the TextBlock as follows:


<TextBlock Text='{x:Static local:Resource1.CopyrightInfo}'/>

Where the ‘local’ should be mapped to Resource1.resx’s namespace (you can find out by opening the resx’s code-behind file).

Share with

Share on twitter
Share on facebook
Share on linkedin

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.