The StringFormat parameter of MultiBinding is incorrect.
In the binding of wpf, we will use multi-value binding, as shown below:
<MultiBinding Mode="OneWay" StringFormat="{3}({0}/{1}):{2}">
<Binding Path="CurIndex" Mode="OneWay"></Binding>
<Binding Path="TotalCount" Mode="OneWay"></Binding>
<Binding Path="CurName" Mode="OneWay"></Binding>
<Binding Path="AreaName" Mode="OneWay"></Binding>
</MultiBinding>
If
StringFormat = "{3} ({0}/{1}): {2}" in this case, the write cannot pass the compiler. The solution is to add a set of braces in front of it, as follows:
StringFormat = "{}{ 3} ({0}/{1}): {2 }"
Complete binding is as follows:
<TextBlock.Text>
<MultiBinding Mode="OneWay" StringFormat="{}{3}({0}/{1}):{2}">
<Binding Path="CurIndex" Mode="OneWay"></Binding>
<Binding Path="TotalCount" Mode="OneWay"></Binding>
<Binding Path="CurName" Mode="OneWay"></Binding>
<Binding Path="AreaName" Mode="OneWay"></Binding>
</MultiBinding>
</TextBlock.Text>