RibbonPanel.AddSlideOut
Public Class
InvalidOperationException
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()
Exceptions
Exception
Condition
InvalidOperationException
Thrown 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);}