WPF Button control appearance

WPF Button control appearance

kevin_fielding
Advocate Advocate
735 Views
1 Reply
Message 1 of 2

WPF Button control appearance

kevin_fielding
Advocate
Advocate

I've finally made the jump from Winforms to WPF for Revit addins. However I'm stumped at the moment.  When I add a button to a window and change the background it remains the default grey appearance in Revit. 

 

My code is fine as I've tested this in an external application, it appears that Revit is overriding the button style.  

 

Regardless of whether the button background has a solidcolorbrush or an imagebrush the button appears grey. 

 

I've tested this in Revit 2018 and 2020. 

 

Is this a known issue?

0 Likes
Accepted solutions (1)
736 Views
1 Reply
Reply (1)
Message 2 of 2

kevin_fielding
Advocate
Advocate
Accepted solution

Solved, I needed to override the ControlTemplate for the button. 

0 Likes