如何在WPF(C#)中删除Expander控件标头的虚线轮廓?

use*_*246 5 .net c# wpf

如何在WPF(C#)中删除Expander控件标头的虚线轮廓?

我尝试通过将FocusVisualStyle设置为null但没有运气。还有其他方法吗?

<UserControl x:Class="MyControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Height="373" Width="669">
    <Expander FocusVisualStyle="{x:Null}" Expanded="expander1_Expanded" Focusable="False" Foreground="DarkBlue" Header="My Header" Height="219" Name="expander1" Width="525">

.....
Run Code Online (Sandbox Code Playgroud)

Y.Y*_*hus 0

尝试不仅更改 Expander 的 FocusVisualStyle,还更改其模板部分的 FocusVisualStyle,例如使用 Blend 更改模板,并查看哪些模板部分也具有焦点样式。