我有一个切换按钮
<ToggleButton Padding="1">
<TextBlock>
<Underline>Week</Underline>
</TextBlock>
</ToggleButton>
我需要更改的是在未选中切换按钮时将下划线设置为false,并在选中控件时将其设置为true。
现在我只有
<ToggleButton Padding="1">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="IsChecked">
<Storyboard Duration="0:0:0">
我不知道接下来会发生什么。
我不坚持使用文本块的概念。ToggleButton 中的文本应该是下划线,仅此而已。