How do I set a Multibinding and Image in Expander Header
-
29-09-2019 - |
Question
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!
Solution
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>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow