1

I want to customize normal WPF Ribbon layout. As shown below I want to remove the command area of ribbon control.

enter image description here

Please suggest any way to achieve this.

Naresh Goradara
  • 1,896
  • 2
  • 30
  • 41

2 Answers2

2

I got the solution from this link

    void ribbon_Loaded(object sender, RoutedEventArgs e)
    {
        Grid child = VisualTreeHelper.GetChild((DependencyObject)sender, 0) as Grid;
        if (child != null)
        {
            child.RowDefinitions[0].Height = new GridLength(0);
        }
    }
Community
  • 1
  • 1
Naresh Goradara
  • 1,896
  • 2
  • 30
  • 41
0

If you want to move the Quick Access Toolbar spacing you can change the main window to be a RibbonWindow. This will move the Quick Access Toolbar to the top title bar. If there are no items, it will be hidden.

XAML:

<ribbon1:RibbonWindow x:Class="Example.MainWindow"
   xmlns:ribbon1="clr-namespace:System.Windows.Controls.Ribbon;
      assembly=System.Windows.Controls.Ribbon"
   ...

Codebehind:

namespace Example
{
   public partial class MainWindow : RibbonWindow
   {
      ...
SwDevMan81
  • 48,814
  • 22
  • 151
  • 184