日期:2014-05-16 浏览次数:21407 次
TabItem temptb = new TabItem();
LinearGradientBrush _brush = new LinearGradientBrush();
Color sColor = Color.FromArgb(255, 122, 210, 231);
Color eColor = Color.FromArgb(255, 14, 75, 133);
_brush.StartPoint = new Point(0.5, 0);
_brush.EndPoint = new Point(0.5, 1);
_brush.GradientStops.Add(new GradientStop(sColor, 0.0));
_brush.GradientStops.Add(new GradientStop(eColor, 1.0));
temptb.Width = 70;
temptb.Header = "111";
temptb.Background = _brush;
Grid tempGrid = new Grid();
tempGrid.Background =new SolidColorBrush(Colors.Yellow);
temptb.Content = tempGrid;
tabControl1.Items.Add(temptb);