I am trying to add an image to my GroupBox Header like so:
<GroupBox>
<GroupBox.Header>
<StackPanel Orientation="Horizontal">
<Label Content="Test Box" />
<Image Source="MyImage.jpg" />
</StackPanel>
</GroupBox.Header>
.....
<!-- All my other code which I know works correctly -->
.....
<GroupBox>
However, what shows up for my GroupBox
Header
is:
I see this method of modifying the GroupBox
Header
all over the web when I search on how to do this but I cannot get it to work. I even tried removing the Image
in case that was causing an issue and it still give the same result.
What am I doing wrong here?
TextBlock
instead ofContentPresenter
to display header content