ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / StyleProjectItem Class / IsCurrent Property
Example

In This Topic
    IsCurrent Property (StyleProjectItem)
    In This Topic
    Gets the value which indicates if the StyleProjectItem is using the current ArcGIS Pro version.
    Syntax
    Public ReadOnly Property IsCurrent As Boolean
    public bool IsCurrent {get;}
    Example
    How to determine if a style is current
    {
        //Add the style to the current project
        //Note: Needs QueuedTask to run
        string stylePath = @"C:\MyStyles\MyStyle.stylx";
        StyleHelper.AddStyle(Project.Current, stylePath);
        StyleProjectItem styleToCheck = Project.Current.GetItems<StyleProjectItem>().First(x => x.Path == stylePath);
        //returns true if style matches the current Pro version
        bool isCurrent = styleToCheck.IsCurrent;
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also