RemoveItem Method (StyleHelper)
Removes a style item from a style. This method must be called on the MCT. Use QueuedTask.Run.
How to remove a style item from a style
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);
});
}
Target Platforms: Windows 11, Windows 10
ArcGIS Pro version: 3.0 or higher.