ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / StyleHelper Class / RemoveItem Method
The StyleProjectItem from which StyleItem will be removed.
The StyleItem to be removed.
Example

In This Topic
    RemoveItem Method (StyleHelper)
    In This Topic
    Removes a style item from a style. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Public Shared Sub RemoveItem( _
       ByVal styleProjectItem As StyleProjectItem, _
       ByVal item As StyleItem _
    ) 
    public static void RemoveItem( 
       StyleProjectItem styleProjectItem,
       StyleItem item
    )

    Parameters

    styleProjectItem
    The StyleProjectItem from which StyleItem will be removed.
    item
    The StyleItem to be removed.
    Exceptions
    ExceptionDescription
    This method must be called within the lambda passed to QueuedTask.Run
    Removing an item cannot be performed on a read-only style.
    Example
    How to remove a style item from a style
    {
        //Remove any item from style
        //Note: symbolStyleItem was created above in the variable initialization section
        //Note: Needs QueuedTask to run
        styleProjectItem.RemoveItem(symbolStyleItem);
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also