문제

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