I want to customize normal WPF Ribbon layout. As shown below I want to remove the command area of ribbon control.
Please suggest any way to achieve this.
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);
}
}
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
{
...