After clicking the WPF buttons in our app they glow blue, back to original color, back to blue, etc. This appears to be default behavior on Windows Vista/7. It does not happen on XP. Any advice?
相关问题
- VNC control for WPF application
- How to stylize text in an alert box? [duplicate]
- WPF Binding from System.Windows.SystemParameters.P
- XAML: Applying styles to nested controls
- XAML: Applying styles to nested controls
You need to override the
ControlTemplate
. Otherwise it's using triggers to set the colors on events like hovering the mouse over it. If you simply set theBackground
, you're only setting the default background when there's noTrigger
s going on.You need to override the default button template -- http://mark-dot-net.blogspot.com/2007/07/creating-custom-wpf-button-template-in.html should get ya started.
Specifically Section 3: