WPF window border acting weird with Ribbon Control

前端 未结 2 1891
青春惊慌失措
青春惊慌失措 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 <ribbon:RibbonWindow on the beginning of the xaml, Make it <Window .
    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 :

     <r:Ribbon x:Name="Ribbon" prism:RegionManager.RegionName="RibbonRegion" Margin="0,-22,0,0" >
    

    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!

    0 讨论(0)
  • 2021-01-14 12:08

    I personally would, either play on margins, or better than that, investigate the style of that ribbon and change it the way it helps my needs

    0 讨论(0)
提交回复
热议问题