ArcGIS Pro 2.7 API Reference Guide
RemoveItem Method (StyleHelper)
Example 

ArcGIS.Desktop.Mapping Namespace > StyleHelper Class : RemoveItem Method
The StyleProjectItem from which StyleItem will be removed.
The StyleItem to be removed.
Removes a style item from a style. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public static void RemoveItem( 
   StyleProjectItem styleProjectItem,
   StyleItem item
)
Public Shared Sub RemoveItem( _
   ByVal styleProjectItem As StyleProjectItem, _
   ByVal item As StyleItem _
) 

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
public Task RemoveStyleItemAsync(StyleProjectItem style, StyleItem itemToRemove)
{
  return QueuedTask.Run(() =>
  {
    if (style == null || itemToRemove == null)
      throw new System.ArgumentNullException();

    //Remove the item from style
    style.RemoveItem(itemToRemove);
  });
}
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

StyleHelper Class
StyleHelper Members