Esempio n. 1
0
        public void RemoveBar(Bar bar)
        {
            var index = Bars.IndexOf(bar);

            bar.SetEmpty();
            Bars.Remove(bar);
            BarRemoved?.Invoke(this, bar);
        }
Esempio n. 2
0
        /// <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);
            }
        }