WPF Ribbon控件的一些小问题的解决


1.RibbonWindow在win8系统theme的问题

 
     问题:如果引用RibbonControlLiberary.dll(在 http://www.microsoft.com/en-us/download/details.aspx?id=11877下载并安装得到的),并且在xaml中使用其中的ribbonwindow的控件的话,会导致该窗口在win8中表现出没有aero效果的样子,很难看,如图。
     解决:使用System.Window.Control.Ribbon.dll,这个dll中的RibbonWindow在win7和win8中都表现正常。
 
2.使用RibbonWindow,由于Border太窄,Title和Icon超出了屏幕
 
     问题:如图所示
 
 
   
   解决:这个是微软的一个bug
     并且没有一个较好的官方解决方案。
     那么要如何解决这个问题呢,我的方法是使用普通的window,然后让ribbon控件margin 0,-22,0,0 这种方案只适合于没有quickaccess toolbar的窗口。因为margin就是将quickaccess toolbar的那块给隐藏起来了,这是一个取巧的办法,并没有根本的解决问题,上面链接中有一个解决方法,不过貌似只能在xp上实现,我在win7和win8上都试验过,没有效果。原文是:
     This falsely indicates to the compiler that the code might run on XP. You can set the property by inserting <subsystemversion>5.0</subsystemversion> into a <PropertyGroup> in the project file. (In VS, right click on the project and choose Unload. Right click again and a new option is available to edit the project file. After making the change, use the Reload option on the right click menu.)
     如果有其他更好的解决方案欢迎大家提出来让我学习学习。
posted @ 2013-05-03 19:34  Arthars  阅读(2578)  评论(0编辑  收藏  举报