'System.Windows.Data.MultiBinding' is not a valid value for property 'Text'.

Posted by chaiguy on Stack Overflow See other posts from Stack Overflow or by chaiguy
Published on 2010-06-15T22:03:55Z Indexed on 2010/06/15 22:52 UTC
Read the original article Hit count: 319

I'm trying to write a custom MarkupExtension that allows me to use my own mechanisms for defining a binding, however when I attempt to return a MultiBinding from my MarkupExtension I get the above exception.

I have:

<TextBlock Text="{my:CustomMarkup ...}" />

CustomMarkup returns a MultiBinding, but apparently Text doesn't like being set to a MultiBinding. How come it works when I say:

<TextBlock>
    <TextBlock.Text>
        <MultiBinding ... />
    </TextBlock.Text>
</TextBlock>

But it doesn't work the way I'm doing it?

© Stack Overflow or respective owner

Related posts about c#

Related posts about wpf