| Revit 2021.1 API | 
| View..::..SetBackground Method | 
| View Class See Also | 
   Sets the background for the view.  Background can only be set for 3d views and for Sections/Elevations.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
Since: 
   2014
 Syntax
Syntax
| C# | 
|---|
| public void SetBackground( ViewDisplayBackground background ) | 
| Visual Basic | 
|---|
| Public Sub SetBackground ( _ background As ViewDisplayBackground _ ) | 
| Visual C++ | 
|---|
| public: void SetBackground( ViewDisplayBackground^ background ) | 
Parameters
- background
- Type: Autodesk.Revit.DB..::..ViewDisplayBackground
 Background to set. See 'ViewDisplayBackground' class and its 'create' methods.
 Exceptions
Exceptions
| Exception | Condition | 
|---|---|
| Autodesk.Revit.Exceptions..::..ArgumentException | The background object is invalid, or view has 'Rendering' style. | 
| Autodesk.Revit.Exceptions..::..ArgumentNullException | A non-optional argument was NULL | 
| Autodesk.Revit.Exceptions..::..InvalidOperationException | This view does not contain display-related properties. |