Search code examples
wpfstringstring-concatenationconcatenationtextblock

Concat strings in a textblock with static ressources (without bindings)


i try doing something like this:

<Label Content="{x:Static localization:localization.Offset}" ContentStringFormat="{}{0} A"/>

the result of this line is: "Offset A"

i would like to do that with a textblock. is that possible?


Solution

  • You can try something like this:

    <TextBlock Text="{Binding Source={x:Static localization:localization.Offset}, 
        StringFormat={}{0} A}" />