using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace EleCho.WpfSuite { /// public class ListBox : System.Windows.Controls.ListBox { static ListBox() { DefaultStyleKeyProperty.OverrideMetadata(typeof(ListBox), new FrameworkPropertyMetadata(typeof(ListBox))); } /// /// The CornerRadius property allows users to control the roundness of the corners independently by /// setting a radius value for each corner. Radius values that are too large are scaled so that they /// smoothly blend from corner to corner. /// public CornerRadius CornerRadius { get { return (CornerRadius)GetValue(CornerRadiusProperty); } set { SetValue(CornerRadiusProperty, value); } } /// /// Background when disabled /// public Brush DisabledBackground { get { return (Brush)GetValue(DisabledBackgroundProperty); } set { SetValue(DisabledBackgroundProperty, value); } } /// /// BorderBrush when pressed by mouse /// public Brush DisabledBorderBrush { get { return (Brush)GetValue(DisabledBorderBrushProperty); } set { SetValue(DisabledBorderBrushProperty, value); } } /// /// DependencyProperty of property /// public static readonly DependencyProperty CornerRadiusProperty = System.Windows.Controls.Border.CornerRadiusProperty.AddOwner(typeof(ListBox)); /// /// The DependencyProperty of property /// public static readonly DependencyProperty DisabledBackgroundProperty = DependencyProperty.Register(nameof(DisabledBackground), typeof(Brush), typeof(ListBox), new FrameworkPropertyMetadata(null)); /// /// The DependencyProperty of property /// public static readonly DependencyProperty DisabledBorderBrushProperty = DependencyProperty.Register(nameof(DisabledBorderBrush), typeof(Brush), typeof(ListBox), new FrameworkPropertyMetadata(null)); } }