2

この問題を解決するのを手伝ってくれるかもしれません。エキスパンダーのヘッダーに Text-Multibinding と画像を表示したいと考えています。

これは、エキスパンダーの単純化されたコーディングです。

       <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>

そこに画像を設定するにはどうすればよいですか?

前もって感謝します!

4

1 に答える 1

8

これを試して:

<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>
于 2010-12-01T16:19:38.110 に答える