SPRibbon.GetCurrent method

Returns the ribbon that exists on the specified page.

Namespace:  Microsoft.SharePoint.WebControls
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Shared Function GetCurrent ( _
    page As Page _
) As SPRibbon
'Usage
Dim page As Page
Dim returnValue As SPRibbon

returnValue = SPRibbon.GetCurrent(page)
public static SPRibbon GetCurrent(
    Page page
)

Parameters

Return value

Type: Microsoft.SharePoint.WebControls.SPRibbon
Returns SPRibbon.

Remarks

The ribbon control can be accessed after OnInit event fires, but it cannot be manipulated or changed other than to show or hide it. This is because the ribbon control registers itself during the OnInit event.

See also

Reference

SPRibbon class

SPRibbon members

Microsoft.SharePoint.WebControls namespace