Microsoft Ribbon doesn't render in Designer

若如初见. 提交于 2019-12-02 01:56:59

问题


I'm using thbe Microsoft Ribbon for WPF (System.Windows.Controls.Ribbon) and VS2015. Since I removed unnecessary depencies from my project (like Dynamic Data Display etc, things not related to the ribbon) it does not render correctly in the Designer anymore. All RibbonButtons get rendered as usual buttons and so on.

I used the Clean Solution option and also rebuild multiple times, without sucess. While execution everything is fine, just the designer can't handle the ribbon anymore. What could have caused this strange behaviour?

This is how my ribbon looks now in the designer:

And this is how it's supposed to look and looked before:

Update: it clearly seems to be a visual studio bug, as I opened the project on another machine with the same VS version and there everything is fine.


回答1:


deleting %LOCALAPPDATA%\Microsoft\VisualStudio\14.0\Designer\ShadowCache wasn't working but this:

  • close solution (at best every instance of VS, you never know)
  • delete bin\ and obj\ in solution folder ("Clean Solution" isn't enough nowadays. Why should it? It isn't anything anyone would ever do if VS is doing strange things. Maybe I should fall back to kill -9 devenv.exe && git clean -fX as default m( )
  • Reopen solution and hope for the best.

This drove me nuts. The only real google hits for this problem was this SO question, another one without any answer, 500+ pseudomirrors of SO and thousands of false positives... sorry for the rant.




回答2:


The problem was resolved by clearing the Visual Studio Designer Cache. This is done by deleting the subfolders in %LOCALAPPDATA%\Microsoft\VisualStudio\14.0\Designer\ShadowCache



来源:https://stackoverflow.com/questions/40490518/microsoft-ribbon-doesnt-render-in-designer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!