Search code examples
wpfcustomizationribbonribboncontrolslibrary

Customize WPF Ribbon


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.


Solution

  • 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);
            }
        }