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