RibbonPanel.AddSlideOut Method

RibbonPanelAddSlideOut Method

Adds a slideout to the current panel.

Namespace: Autodesk.Revit.UI
Assembly: RevitAPIUI (in RevitAPIUI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public void AddSlideOut()
Public Sub AddSlideOut
public:
void AddSlideOut()
member AddSlideOut : unit -> unit 
Exceptions
ExceptionCondition
InvalidOperationExceptionThrown when a slide out panel is already added.
Remarks
The slideout part of the panel can be shown by clicking on the arrow at the bottom of the panel. After calling AddSlideOut(), any subsequent calls to add new items will add the new item(s) to the slideout. The slideout part of the panel will be shown only if items are added after this call.
Example
private static void AddSlideOut(RibbonPanel panel)
{
    string assembly = @"D:\Sample\HelloWorld\bin\Debug\HelloWorld.dll";

    panel.AddSlideOut();

    // create some controls for the slide out
    PushButtonData b1 = new PushButtonData("ButtonName1", "Button 1",
        assembly, "Hello.HelloButton");
    b1.LargeImage = new BitmapImage(new Uri(@"D:\Sample\HelloWorld\bin\Debug\39-Globe_32x32.png"));
    PushButtonData b2 = new PushButtonData("ButtonName2", "Button 2",
        assembly, "Hello.HelloTwo");
    b2.LargeImage = new BitmapImage(new Uri(@"D:\Sample\HelloWorld\bin\Debug\39-Globe_16x16.png"));

    // items added after call to AddSlideOut() are added to slide-out automatically
    panel.AddItem(b1);
    panel.AddItem(b2);
}
Private Shared Sub AddSlideOut(panel As RibbonPanel)
   Dim assembly As String = "D:\Sample\HelloWorld\bin\Debug\HelloWorld.dll"

   panel.AddSlideOut()

   ' create some controls for the slide out
   Dim b1 As New PushButtonData("ButtonName1", "Button 1", assembly, "Hello.HelloButton")
   b1.LargeImage = New BitmapImage(New Uri("D:\Sample\HelloWorld\bin\Debug\39-Globe_32x32.png"))
   Dim b2 As New PushButtonData("ButtonName2", "Button 2", assembly, "Hello.HelloTwo")
   b2.LargeImage = New BitmapImage(New Uri("D:\Sample\HelloWorld\bin\Debug\39-Globe_16x16.png"))

   ' items added after call to AddSlideOut() are added to slide-out automatically
   panel.AddItem(b1)
   panel.AddItem(b2)
End Sub

No code example is currently available or this language may not be supported.

No code example is currently available or this language may not be supported.

See Also