fluentribbon / Fluent.Ribbon

WPF Ribbon control like in Office
http://fluentribbon.github.io
MIT License
2.56k stars 519 forks source link

Rendering of Office 2010 theme incorrect on Windows 10 #146

Closed huoyaoyuan closed 8 years ago

huoyaoyuan commented 9 years ago

The window cannot be rendered totally, whether I set DontUseDwm to true or false, it comes into a block of black.

huoyaoyuan commented 9 years ago

Not the fault of Windows 10, it does't work on Windows 7 as well. DontUseDwm=false:there's nothing in titlebar, and the content of window is black DontUseDwm=true:the window is black totally Have I missed anything?

batzen commented 9 years ago

Did you add the Generic.xaml from any theme? Does the showcase application work?

huoyaoyuan commented 9 years ago

No, I haven't see it at https://github.com/fluentribbon/Fluent.Ribbon/wiki/Foundation. The build of showcase application failed because I fail to install nuget package MahMetro. I'll retry it.

huoyaoyuan commented 9 years ago
Showcase build pass and works, but still some issues: (all on Windows 10)

RibbonWindow border looks strange when using theme Office2010(Dwm) and Windows8: it's the fault of win10's dwm because it renders border colorful but title white; Alignment error when changing Office2010(No dwm) to other theme; The aero effect is not as good as Microsoft Ribbon for WPF in Office2010 theme; can it be adjusted just by modifying the resouce file?

And a question:

An application must have only 1 Backstage or ApplicationMenu?

batzen commented 9 years ago

It's indeed broken. Will have a look at this. An application can have both, a single window can only have one menu. If that was your question.

batzen commented 9 years ago

To sum this up:

  1. Border size is just wrong on Windows 10. But I don't know what I should do to avoid that without possibly breaking it on Windows 7 & 8. I could try to use SystemParameters.WindowResizeBorderThickness, but sadly that's not available in .NET 4.0 and I would have to use it very differently in different places. For example these parts have custom margins which are based on the border size:
    • PART_ContentPresenter
    • PART_IconImage
    • PART_WindowCommands
    • border4 GlassBorderThickness is also based on border size. The window buttons are also off and their width should be calculated based on SystemParameters.WindowCaptionButtonWidth. To sum this one point up: It's a lot of work that has to be done and I am not willing to invest that much time in themes neither I nor my employer uses. So it's sad but true: If you want this fixed you will probably have to implement the fixes (part margins, glassborderthickness, button width calculation and making data from SystemParameters available in .NET 4.0) in separate pull requests.
  2. Alignment: If you are talking about alignments inside the ribbon, yes there is an issue. But that issue can be worked around by resizing the window. Will add resizing to the showcase application so that anyone who implements theming can copy that code.
  3. Aero effect on Windows 10? I got no Aero effects on Windows 10.
Torvin commented 9 years ago

Is there a simple way of displaying window borders in default system Windows10 style, while keeping the ribbon styled in Office 2007/2010 theme?

Edit: to clarify, is there a way to turn off window chrome styling? And just use the standard system one, while retaining quick access toolbar etc. If not, is there a way use Office 2013 style for the window (which has no problems on Win10), while using 2007/2010 style for the ribbon?

batzen commented 9 years ago

The simple answer: No there is no simple way, not if you want to support all OS versions.

batzen commented 8 years ago

Is fixed, from my point of view.