0

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!

2
  • Why dont you format your string in the converter? I dont think that both is possible.
    – Florian Gl
    Jul 5, 2013 at 10:51
  • See my answer below - I have figured out the issue.
    – Tim Woods
    Jul 5, 2013 at 11:00

1 Answer 1

0

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.

1
  • trying to do the same but unfortunately i'm stuck with a non string content and the converter is variable multibindings and parameters
    – Franck
    Nov 13, 2013 at 17:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.