CurrentButton Property


Gets or sets the current PushButton of the SplitButton.

Namespace: Autodesk.Revit.UI
Assembly: RevitAPIUI (in RevitAPIUI.dll) Version: 2015.0.0.0 (2015.0.0.0)
Since: 2011

Syntax

C#
public PushButton CurrentButton { get; set; }
Visual Basic
Public Property CurrentButton As PushButton
	Get
	Set
Visual C++
public:
property PushButton^ CurrentButton {
	PushButton^ get ();
	void set (PushButton^ value);
}

Remarks

This property is applicable only if IsSynchronizedWithCurrentItem is true. The default value of this property will be the first enabled PushButton in the drop down list after the SplitButton is shown.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentNullException Thrown when trying to set the CurrentButton to a null reference ( Nothing in Visual Basic) .
Autodesk.Revit.Exceptions ArgumentException Thrown when trying to set the CurrentButton to a button which is not in current drop-down list.
Autodesk.Revit.Exceptions InvalidOperationException Thrown when trying to set the CurrentButton if IsSynchronizedWithCurrentItem is false.

See Also