Thursday 15 January 2015

wpf - TextBlock Using A C# Style String.Format For Text -



wpf - TextBlock Using A C# Style String.Format For Text -

this question has reply here:

use stringformat add together string wpf xaml binding 2 answers

c# has function string.format(string, arguments[]) works following.

string.format("here's argument {0}", 1337)

this homecoming string "here's argument 1337". textblock object i'm having problem getting functionality this. like

<textblock text=string.format("here's argument {0}", {binding argument})/>

where it's taking binding input can't seem find way single textblock. there similar object type handle or there way pull off text blocks?

you can utilize stringformat that

<textblock text="{binding argument, stringformat=here\'s argument {0}}"/>

c# wpf xaml textblock string.format

No comments:

Post a Comment