WPF关注“运行”元素

| 我想更改焦点位于ѭ1的ѭ0的背景和ѭ2的背景。 我想向用户提供有关他们当前正在编辑哪个“ 0”元素的视觉提示,我认为浅色背景将是我的应用程序的最佳方法。 我看到
Run
具有
Focusable
(我将其设置为true),
IsFocused
FocusVisualStyle
GotFocus
等,但是这些属性或事件均无法正常工作。 感谢您提供的任何帮助。     
已邀请:
        您可以使用数据触发器来获得所需的效果。这是一个例子:
<Style TargetType=\"{x:Type RichTextBox}\">
    <Style.Triggers>
        <Trigger Property=\"IsFocused\" Value=\"true\"> 
            <Setter Property=\"BorderBrush\" Value=\"LightGrey\" />
        </Trigger>
    </Style.Triggers> 
</Style>
    

要回复问题请先登录注册