如何在tabitem中获取所选颜色?
我想用它来改变背景:
t.Background = new SolidColorBrush(SystemColors.WindowColor);
并尝试了所有可能性但没有得到正确的
答案 0 :(得分:1)
试试这个:
Brush brsTabSelected = default(Brush);
private void WindowViewBase_Loaded(object sender, RoutedEventArgs e)
{
tabItem1.IsSelected = true;
brsTabSelected = tabItem1.Background;
}