WPF Ribbon - Hide quick access toolbar

redman picture redman · Jun 7, 2011 · Viewed 17.5k times · Source

how do you hide Quick Access Toolbar in a WPF's Ribbon?

Answer

Philippe Lavoie picture Philippe Lavoie · Aug 5, 2011

For Microsoft Ribbon for WPF, you can hide it by using the VisualTreeHelper. On the Loaded event handler, just resize the row containing the Quick Access Toolbar to 0 :

private void RibbonLoaded(object sender, RoutedEventArgs e)
{
  Grid child = VisualTreeHelper.GetChild((DependencyObject)sender, 0) as Grid;
  if (child != null)
  {
    child.RowDefinitions[0].Height = new GridLength(0);
  }
}

enter image description here