ArcGIS Pro 2.7 API Reference Guide
AddStyle Method
Example 

ArcGIS.Desktop.Mapping Namespace > StyleHelper Class : AddStyle Method
The current ArcGIS Pro project to which the style has to be added.
Name of a core ArcGIS Pro style or the full path to a style file (.stylx) on disk that has to be added to the current project.
Adds the specified style to the current project. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public static void AddStyle( 
   Project project,
   string styleName
)
Public Shared Sub AddStyle( _
   ByVal project As Project, _
   ByVal styleName As String _
) 

Parameters

project
The current ArcGIS Pro project to which the style has to be added.
styleName
Name of a core ArcGIS Pro style or the full path to a style file (.stylx) on disk that has to be added to the current project.
Exceptions
ExceptionDescription
This method must be called within the lambda passed to QueuedTask.Run
Remarks
The path of style file to be added is case sensitive.
Example
//For ArcGIS Pro system styles, just pass in the name of the style to add to the project
await QueuedTask.Run(() => StyleHelper.AddStyle(Project.Current, "3D Vehicles"));

//For custom styles, pass in the full path to the style file on disk
string customStyleToAdd = @"C:\Temp\CustomStyle.stylx";
await QueuedTask.Run(() => StyleHelper.AddStyle(Project.Current, customStyleToAdd));
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

StyleHelper Class
StyleHelper Members