Version

Ribbon Property

Returns/sets the XamRibbon control to be displayed within the caption area of the containing XamRibbonWindow.
Syntax
'Declaration
 
Public Property Ribbon As XamRibbon
public XamRibbon Ribbon {get; set;}
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