Version

XamRibbonWindow Class

A derived System.Windows.Window class that is designed to display a XamRibbon within its caption area similar to that of Microsoft Office 2007 applications.
Syntax
'Declaration
 
Public Class XamRibbonWindow 
   Inherits System.Windows.Window
public class XamRibbonWindow : System.Windows.Window 
Remarks

The XamRibbonWindow class is derived from the WPF System.Windows.Window class. It is designed to be used with the XamRibbon in rich client applications to enable the placement of the XamRibbon in the caption area (i.e., non-client area) of the window. When the XamRibbon is used in a standard WPF System.Windows.Window or on a WPF System.Windows.Controls.Page, it appears inside the bounds of the window’s or page’s non-client area.

Note: The only System.Windows.Controls.ContentControl.Content that should be placed inside this window is a RibbonWindowContentHost. The XamRibbon is associated with this window by setting the RibbonWindowContentHost.Ribbon property of the RibbonWindowContentHost to an instance of a XamRibbon.

Example
XamRibbon Sample

Public Partial Class CodeRibbonWindow 
    Inherits XamRibbonWindow 
    Private xamRibbon As XamRibbon 
    Public Sub New() 
        InitializeComponent() 
        initRibbonItems() 
    End Sub 
    
    Private Sub initRibbonItems() 
        'Create RibbonWindowContentHost 
        Dim xamContentHost As New RibbonWindowContentHost() 
        Me.Content = xamContentHost 
        'Create XamRibbon object 
        xamRibbon = New XamRibbon() 
        xamContentHost.Ribbon = xamRibbon 
        DockPanel.SetDock(xamRibbon, Dock.Top) 
    End Sub 
End Class
public partial class CodeRibbonWindow : XamRibbonWindow
{
	XamRibbon xamRibbon;
	public CodeRibbonWindow()
	{
		InitializeComponent();
		initRibbonItems();
	}
	
	private void initRibbonItems()
	{
		//Create RibbonWindowContentHost
		RibbonWindowContentHost xamContentHost = new RibbonWindowContentHost();
		this.Content = xamContentHost;
		//Create XamRibbon object
		xamRibbon = new XamRibbon();
		xamContentHost.Ribbon = xamRibbon;
		DockPanel.SetDock(xamRibbon, Dock.Top);
	}
}
<igRibbon:XamRibbonWindow x:Class="SnippetApplication.RibbonWindow"
    
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    
xmlns:s="clr-namespace:System;assembly=mscorlib" 
    
xmlns:igRibbon="http://infragistics.com/Ribbon"
    
xmlns:igEditors="http://infragistics.com/Editors"
    
xmlns:igWindows="http://infragistics.com/Windows"         
    
Title="Xaml Ribbon Samples" Height="300" Width="600"
    
WindowStartupLocation="CenterScreen">
    
<igRibbon:RibbonWindowContentHost>

        
<igRibbon:RibbonWindowContentHost.Ribbon>
            
<!--XamRibbon-->
            
<igRibbon:XamRibbon x:Name="myRibbon" DockPanel.Dock="Top">
            
<!--XamRibbon items .... -->
            
</igRibbon:XamRibbon>
            
<!--XamRibbon-end-->
        
</igRibbon:RibbonWindowContentHost.Ribbon>    
    
</igRibbon:RibbonWindowContentHost>
</igRibbon:XamRibbonWindow    >
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also