开发者

How to get rid of the untouchable yellow border of the ribbon menu-button?

开发者 https://www.devze.com 2023-01-20 02:15 出处:网络
I\'m new to WPF control template and need your help on this. I g开发者_运维技巧ot a sample Microsoft Ribbon project here.

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.

How to get rid of the untouchable yellow border of the ribbon menu-button?

If you have a work-around, please help!

You can get MS Ribbon from:

  1. http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=2bfc3187-74aa-4154-a670-76ef8bc2a0b4
  2. 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 :

  1. Change the "yellow" to white.
  2. Coloring blue everything else that highlighted.
  3. The red high light color is kept the same as the initial demo solution.
  4. 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:

  1. If don't use the WPF theme, the bug appears !?
  2. 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!

0

精彩评论

暂无评论...
验证码 换一张
取 消