46 lines
1.2 KiB
C#
46 lines
1.2 KiB
C#
using System;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Media;
|
|
namespace HiiShe.WPFUI.Controls
|
|
{
|
|
public class HSTabItem : TabItem
|
|
{
|
|
public static readonly DependencyProperty MyMoverBrushProperty;
|
|
public static readonly DependencyProperty MyEnterBrushProperty;
|
|
public Brush MyMoverBrush
|
|
{
|
|
get
|
|
{
|
|
return base.GetValue(HSTabItem.MyMoverBrushProperty) as Brush;
|
|
}
|
|
set
|
|
{
|
|
base.SetValue(HSTabItem.MyMoverBrushProperty, value);
|
|
}
|
|
}
|
|
public Brush MyEnterBrush
|
|
{
|
|
get
|
|
{
|
|
return base.GetValue(HSTabItem.MyEnterBrushProperty) as Brush;
|
|
}
|
|
set
|
|
{
|
|
base.SetValue(HSTabItem.MyEnterBrushProperty, value);
|
|
}
|
|
}
|
|
static HSTabItem()
|
|
{
|
|
HSTabItem.MyMoverBrushProperty = DependencyProperty.Register("MyMoverBrush", typeof(Brush), typeof(HSTabItem), new PropertyMetadata(null));
|
|
HSTabItem.MyEnterBrushProperty = DependencyProperty.Register("MyEnterBrush", typeof(Brush), typeof(HSTabItem), new PropertyMetadata(null));
|
|
FrameworkElement.DefaultStyleKeyProperty.OverrideMetadata(typeof(HSTabItem), new FrameworkPropertyMetadata(typeof(HSTabItem)));
|
|
}
|
|
public HSTabItem()
|
|
{
|
|
base.Header = "测试按钮";
|
|
base.Background = Brushes.Blue;
|
|
}
|
|
}
|
|
}
|