ArcGIS Pro 2.7 API Reference Guide
CreateMobileStyle Method
Example 

ArcGIS.Desktop.Mapping Namespace > StyleHelper Class : CreateMobileStyle Method
The current ArcGIS Pro project to which the new mobile style will be added.
The full path on disk of the new mobile style file to be created.
Creates a new mobile style file (.stylx) on disk and adds the mobile style to the current project. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public static void CreateMobileStyle( 
   Project project,
   string styleName
)
Public Shared Sub CreateMobileStyle( _
   ByVal project As Project, _
   ByVal styleName As String _
) 

Parameters

project
The current ArcGIS Pro project to which the new mobile style will be added.
styleName
The full path on disk of the new mobile style file to be created.
Exceptions
ExceptionDescription
This method must be called within the lambda passed to QueuedTask.Run
Example
//Full path for the new style file (.stylx) to be created
string styleToCreate = @"C:\Temp\NewStyle.stylx";
await QueuedTask.Run(() => StyleHelper.CreateStyle(Project.Current, styleToCreate));
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

StyleHelper Class
StyleHelper Members