I am using the following MultiBinding. The converter outputs an int and the expected output of the MultiBinding is something like "SomeText|123". The Bindings and converter work fine, but the StringFormat doesn't seem to be applied - I just get the int value that the converter outputs. Is it possible to apply the StringFormat to the IMultiValueConverter's output?

<MultiBinding Converter="{StaticResource MyConverter}"
              StringFormat="SomeText|{}{0}">
    <Binding />
    <Binding Path="SomePath" />
</MultiBinding>

Thanks!

有帮助吗?

解决方案

The issue was that I was binding to a property of type object. by changing this to a string property the stringformat was used as expected.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top