void OnStyleClassDelete(EventBase evt) { var target = evt.target as VisualElement; var className = target.userData as string; // Actually remove the style class from the element in the canvas. currentVisualElement.RemoveFromClassList(className); // Update VisualTreeAsset. BuilderAssetUtilities.RemoveStyleClassFromElementInAsset( m_PaneWindow.document, currentVisualElement, className); // We actually want to get the notification back and refresh ourselves. m_Selection.NotifyOfHierarchyChange(null); m_Selection.NotifyOfStylingChange(null); evt.StopPropagation(); }