Get values from *.resx files in XAML

前端 未结 7 2029
攒了一身酷
攒了一身酷 2020-11-30 23:24

Is it possible to add some value from resource file right into the XAML markup? Or for localization we always have to make something like this in *.cs file:

         


        
相关标签:
7条回答
  • 2020-12-01 00:08

    Make sure that Code Generation is set to Public in the resx editor, then you can simply use:

    <TextBlock Text="{x:Static Messages.WarningUserMessage}" />
    
    0 讨论(0)
提交回复
热议问题