public void refreshColor() { if (!bgTab) { bg.Background = color; } else { bg.Background = Brushes.Transparent; CloseTab.ImageSource("close_Tab.png"); } }
public Tab(string title, MainWindow mw, UserControl uc, System.Windows.Media.Brush brush) { Dispatcher.BeginInvoke((Action)(() => { darkColor = false; InitializeComponent(); form = uc; color = brush; actualForeground = Brushes.Black; form.HorizontalAlignment = HorizontalAlignment.Stretch; form.VerticalAlignment = VerticalAlignment.Stretch; label_TabTitle.Content = title; Loaded += Tab_Loaded; mainWindow = mw; closeTabMargin = 8; favIconMargin = 6; CloseTab.ImageSource("close_Tab.png"); CloseTab.SetImageScale(8); CloseTab.SetRippleMargin(1); })); }