Наследование: INotifyPropertyChanged
Пример #1
0
        public void ChangeSelectedTab(Tab tab) {

            if (_selectedTab != null)
            {
                _selectedTab.IsSelected = false;
            }

            _selectedTab = tab;
            
            if (this.OnTabChanged != null) this.OnTabChanged(_selectedTab, EventArgs.Empty);
        }
Пример #2
0
        public void AddTab(string name, bool isSelected = false) {
            var newTab = new Tab() { Name = name, IsSelected = isSelected };

            _data.Add(newTab);
            if (isSelected) _selectedTab = newTab; 
        }
Пример #3
0
        public void ChangeSelectedTab(Tab tab) {

            if (_selectedTab != null)
            {
                _selectedTab.IsSelected = false;
            }

            _selectedTab = tab;

            Invalidate();

            OnTabChanged?.Invoke(_selectedTab, EventArgs.Empty);
            TabChangedCommand?.Execute(tab);
        }