WPF window border acting weird with Ribbon Control

前端 未结 2 1906
青春惊慌失措
青春惊慌失措 2021-01-14 11:49

I am using the Ribbon control in WPF and I noticed there are 2 different versions.

  1. using Microsoft.Windows.Controls.Ribbon;

    • If I use this one
2条回答
  •  温柔的废话
    2021-01-14 12:07

    I found the best way to make it look and work good!

    Instead of the tags on the beginning of the xaml, Make it .
    Also add this part:

    xmlns:r="clr-namespace:System.Windows.Controls.Ribbon;assembly=System.Windows.Controls.Ribbon"
    

    Then in your class delete your : RibbonWindow (If it's there)

    If that doesn't work and you don't need the quick access toolbar, this may help: Go back to your XAML, and change the Ribbon margin to -22 :

     
    

    Now my application looks like this(with the -22 margin) : enter image description here

    Now it looks like a normal application without an ugly windows 98 or 2000 style and the close button, minizime button and maximize button are back!

提交回复
热议问题