63 lines
1.6 KiB
C#
63 lines
1.6 KiB
C#
using System.Collections.ObjectModel;
|
|
using System.ComponentModel;
|
|
|
|
namespace DTS.Common.RibbonControl
|
|
{
|
|
public class ContextualTabGroupData : INotifyPropertyChanged
|
|
{
|
|
public ContextualTabGroupData()
|
|
: this(null)
|
|
{
|
|
}
|
|
|
|
public ContextualTabGroupData(string header)
|
|
{
|
|
Header = header;
|
|
}
|
|
|
|
|
|
public string Header
|
|
{
|
|
get => _header;
|
|
|
|
set
|
|
{
|
|
if (_header == value) return;
|
|
_header = value;
|
|
OnPropertyChanged(new PropertyChangedEventArgs("Header"));
|
|
}
|
|
}
|
|
private string _header;
|
|
|
|
public bool IsVisible
|
|
{
|
|
get => _isVisible;
|
|
|
|
set
|
|
{
|
|
if (_isVisible == value) return;
|
|
_isVisible = value;
|
|
OnPropertyChanged(new PropertyChangedEventArgs("IsVisible"));
|
|
}
|
|
}
|
|
private bool _isVisible;
|
|
|
|
public ObservableCollection<TabData> TabDataCollection => _tabDataCollection ?? (_tabDataCollection = new ObservableCollection<TabData>());
|
|
private ObservableCollection<TabData> _tabDataCollection;
|
|
|
|
#region INotifyPropertyChanged Members
|
|
|
|
public event PropertyChangedEventHandler PropertyChanged;
|
|
|
|
private void OnPropertyChanged(PropertyChangedEventArgs e)
|
|
{
|
|
if (PropertyChanged != null)
|
|
{
|
|
PropertyChanged(this, e);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|