使用静态资源连接文本块中的字符串(无绑定)

el-*_*ino 2 string wpf concatenation string-concatenation textblock

我尝试做这样的事情:

<Label Content="{x:Static localization:localization.Offset}" ContentStringFormat="{}{0} A"/>
Run Code Online (Sandbox Code Playgroud)

该行的结果是:“Offset A”

我想用文本块来做到这一点。那可能吗?

She*_*dan 5

你可以尝试这样的事情:

<TextBlock Text="{Binding Source={x:Static localization:localization.Offset}, 
    StringFormat={}{0} A}" />
Run Code Online (Sandbox Code Playgroud)

  • OP 说“没有绑定”。你用绑定给出答案。OP接受......当然,有道理 (3认同)
  • OP不知道他想要什么,我想他想要这个。 (2认同)