CommonButtons Property


The push buttons displayed in the task dialog.

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

Syntax

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

Remarks

If no common button or CommandLink is added to the task dialog, the dialog will contain the Close common button by default.

Revit task dialogs are following these conventions for commit button usage:

  • Use a single Close button instead of a single OK button on informational messages.
  • Use a question at the end of the Main Instruction with a Yes/No combo (or Yes/No/Cancel) instead of OK/Cancel. This should work 99% of the time. For example: "Are you sure you want to overwrite the file?" and use Yes/No buttons.
  • Do not customize the button names unless there is a very good reason to do so. For example, "Are you sure you want to save the file?" would use Yes/No buttons and not Save/No or Save/Cancel.

See Also