Il existe une solution XAML beaucoup plus simple que la modification de modèles. N'utilisez simplement PAS la propriété d'en-tête d'Expander dans ce cas. Au lieu de cela, couvrir l'expandeur avec votre propre TextBlock stylé.
<Application.Resources>
<Style x:Key="ExpanderHeader" TargetType="{x:Type TextBlock}">
<Setter Property="Height" Value="22" />
<Setter Property="Margin" Value="21,0,0,0" />
<Setter Property="Padding" Value="9,3,0,0" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="VerticalAlignment" Value="Top" />
</Style>
</Application.Resources>
<Grid>
<Expander>
<TextBlock Text="I am some content. I have disowned my default header." Margin="10,5" />
</Expander>
<TextBlock Text="I'm filling in for the default header. You'll like me better anyway."
Style="{StaticResource ResourceKey=ExpanderHeader}"/>
</Grid>
Je crois que c'est un double: http://stackoverflow.com/questions/1396153/preventing-a-wpf-expander-from-expanding-when-header-is-clicked. Vous devriez être capable de trouver votre solution là-bas. :) –