开发者

How do I set a Multibinding and Image in Expander Header

perhaps you can help me to solve this problem. I want to display a Text-Multibinding and an image in the header of my expander.

This is my simplified coding of the expander:

       <Expander
        x:Name="开发者_运维问答_myExpander">
        <Expander.Header>
            <MultiBinding
                Converter="{StaticResource ExpanderHeaderConverter}">
                <Binding
                    Path="Property1" />
                <Binding
                    Path="Property2" />
                <Binding
                    Path="Property3" />
            </MultiBinding>
        </Expander.Header>

        <local:Content/>

    </Expander>

How can I set an image in there?

thanks in advance!


Try this:

<Expander.Header>
    <StackPanel Orientation="Horizontal">
        <Image Source="{Binding ...}"/>
        <TextBlock>
            <TextBlock.Text>
                <MultiBinding Converter="{StaticResource ExpanderHeaderConverter}">
                    <Binding Path="Property1" />
                    <Binding Path="Property2" />
                    <Binding Path="Property3" />
                </MultiBinding>
            </TextBlock.Text>
        </TextBlock>
    </StackPanel>
</Expander.Header>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜