开发者

How do I set a Multibinding and Image in Expander Header

开发者 https://www.devze.com 2023-01-28 08:55 出处:网络
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.

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

精彩评论

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