Int32EditBox Background Brush for MouseOver and IsFocused

Editors for WPF Forum

Posted 11 years ago by MCRXB
Version: 13.2.0592


I'm trying to set the background color of the Int32EditBox via triggers, but something in the control template is overriding the MouseOver and IsFocused properties. I'm assuming you are using the default Windows chrome. I'm not sure what part of the control template I need to edit to make this happen, is it PartEditBox or...? And how do I apply this to only the Int32EditBox and not all editor controls?

This is what I've tried so far:

            Value="True" />
            Value="True" />
          Value="{StaticResource ErrorBackgroundBrush}" />
          Value="{StaticResource ErrorBorderBrush}" />

 Thank you!

Comments (1)

Answer - Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA

Hello, I believe your company has WPF Studio so you can have whoever is listed on the account download the default styles and templates from the organization account page.  Then you can see exactly what style and template is used for Int32EditBox. 

The default PartEditBox template makes use of an ElementChrome object that we change the state on via triggers in template.  You'd need to update that as needed for your scenario.

You could make an implicit Style with the updated Template and have it only target Int32EditBox controls.  Then put that in your app's Resources to have it apply to those controls.

[Modified 11 years ago]

Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.