ArcGIS Pro 2.7 API Reference Guide
UpgradeStyle Method

ArcGIS.Desktop.Mapping Namespace > StyleHelper Class : UpgradeStyle Method
The StyleProjectItem to upgrade to the current ArcGIS Pro version.
Upgrades the specified style to the current ArcGIS Pro version. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public static bool UpgradeStyle( 
   StyleProjectItem styleProjectItem
)
Public Shared Function UpgradeStyle( _
   ByVal styleProjectItem As StyleProjectItem _
) As Boolean

Parameters

styleProjectItem
The StyleProjectItem to upgrade to the current ArcGIS Pro version.

Return Value

A boolean indicating if the upgrade operation succeeded.
Exceptions
ExceptionDescription
Upgrading a style cannot be performed on a read-only style.
Upgrading a style cannot be performed on a current or newer version.
This method must be called within the lambda passed to QueuedTask.Run
Remarks
Potential reasons for failure are: style is invalid or read-only
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

StyleHelper Class
StyleHelper Members