TimeSpanEditBox BorderBrush (Hover and Selected)

Editors for WPF Forum

Posted 13 years ago by Jessica
Version: 11.1.0543

I would like to theme the TimeSpanEditBox. I found some brush keys within the EditorsCommonDictionary, but which brush key do I have to use to change the hover and the selected border color?

Thanks in advance.

Comments (1)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Jessica,

In the Aero Normal Color theme, the TimeSpanEditBox uses the same ListBoxChrome control as the native WPF TextBox, which doesn't allow you to customize the hover/focused brushes.

In the Luna themes, it just uses a Border element. So in this case, you could use Style triggers and simply change the BorderBrush based on IsMouseOver or IsKeyboardFocusWithin. But again, this won't work when using the Aero theme (nor will it work with the Classic theme).

If you want to have a consistent look, you could define a custom ControlTemplate that always uses a Border element in an implicit Style. For this you could take the ControlTemplate for the Luna themes as a basis.

Actipro Software Support

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.