HeaderedContentControl包含得组件包含Expander,GroupBox,TabItem
<Window x:Class="WpfApp6.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApp6"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid>
<StackPanel>
<GroupBox Margin="10" BorderBrush="Gray">
<GroupBox.Header>
<StackPanel Orientation="Horizontal">
<Image Source=".\img11.jpg" Width="30" Height="30"></Image>
<TextBlock>Header</TextBlock>
</StackPanel>
</GroupBox.Header>
<TextBlock>group box</TextBlock>
</GroupBox>
</StackPanel>
</Grid>
</Window>
<Window x:Class="WpfApp6.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApp6"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid>
<StackPanel>
<Expander Margin="10" BorderBrush="Gray">
<Expander.Header>
<Image Source=".\img11.jpg" Width="30" Height="30"></Image>
</Expander.Header>
<TextBlock Text="Expander"></TextBlock>
</Expander>
</StackPanel>
</Grid>
</Window>