public void RemoveBar(Bar bar) { var index = Bars.IndexOf(bar); bar.SetEmpty(); Bars.Remove(bar); BarRemoved?.Invoke(this, bar); }
/// <summary> /// See <see cref="UIElementAdapter{TUIElement}.Remove(TUIElement)"/> for more information. /// </summary> protected override void Remove(Bar uiElement) { Guard.ArgumentNotNull(uiElement, "Bar"); int index = bars.IndexOf(uiElement); if (index > -1) { bars.RemoveAt(index); } }