| Revit 2024 API | 
| RibbonPanel..::..AddStackedItems Method (RibbonItemData, RibbonItemData) | 
| RibbonPanel Class See Also | 
 Adds two stacked items to the panel. 
Namespace: Autodesk.Revit.UI
Assembly: RevitAPIUI (in RevitAPIUI.dll) Version: 24.0.0.0 (24.0.0.0)
Since: 2011
 Syntax
Syntax
| C# | 
|---|
| public IList<RibbonItem> AddStackedItems( RibbonItemData item1, RibbonItemData item2 ) | 
| Visual Basic | 
|---|
| Public Function AddStackedItems ( _ item1 As RibbonItemData, _ item2 As RibbonItemData _ ) As IList(Of RibbonItem) | 
| Visual C++ | 
|---|
| public: IList<RibbonItem^>^ AddStackedItems( RibbonItemData^ item1, RibbonItemData^ item2 ) | 
Parameters
- item1
- Type: Autodesk.Revit.UI..::..RibbonItemData
 Data containing information about the first item. This data must be of type PushButtonData, PulldownButtonData, SplitButtonData, ComboBoxData, or TextBoxData.
- item2
- Type: Autodesk.Revit.UI..::..RibbonItemData
 Data containing information about the second item. This data must be of type PushButtonData, PulldownButtonData, SplitButtonData, ComboBoxData, or TextBoxData.
Return Value
A collection containing the added items. Remarks
Remarks
 Each new item may either be a PushButton, PulldownButton, SplitButton, ComboBox or TextBox, depending upon the type of 
data passed in for each argument. The new items will be created as small-size horizontal controls, 
with the first stacked on top of the second in the panel. 
 Exceptions
Exceptions
| Exception | Condition | 
|---|---|
| Autodesk.Revit.Exceptions..::..ArgumentNullException | Thrown when item1 or item2 is nullNothingnullptra null reference (Nothing in Visual Basic). | 
| Autodesk.Revit.Exceptions..::..ArgumentException | Thrown when an item with the item1.Name or item2.Name already exists in the panel or the data is not of the correct type. |