这是我对扩展器的简化编码:
<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>
如何在那里设置图像?
提前感谢!
答案 0 :(得分:6)
试试这个:
<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>