I'm new to WPF control template and need your help on this. I g开发者_运维技巧ot a sample Microsoft Ribbon project here. I tried to change the color of the ribbon menu button but I can not make the yellow border goes off. Please see screenshot below.
If you have a work-around, please help!
You can get MS Ribbon from:
- http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=2bfc3187-74aa-4154-a670-76ef8bc2a0b4
- http://msdn.microsoft.com/en-us/office/aa973809.aspx
This seems to be a desserted questions :(
Luckily after all, I found (cost 2 days) a work-around which uses the WPF Themes (download here 1 & 2 (go to WPF Themes on codeplex.com) ) and change the brush whose key is x:Key="&# 254;"
. Here is my solution which :
- Change the "yellow" to white.
- Coloring blue everything else that highlighted.
- The red high light color is kept the same as the initial demo solution.
- I marked my fix by Fixed the "yellow-border bug" #1 & Fixed the "yellow-border bug" #2
This must be a bug of the Ribbon library since:
- If don't use the WPF theme, the bug appears !?
- The brushes #254 only got effective only if the a WPF theme used
It costs me so much time so I posted here to save the followers like me.
Hope this will help you!
精彩评论