1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Media;
- namespace CyberX8_Themes.CustomControls
- {
- public class AduRadioButtonIcon : RadioButton
- {
- public AduRadioButtonIcon()
- {
-
- }
- static AduRadioButtonIcon()
- {
- DefaultStyleKeyProperty.OverrideMetadata(typeof(AduRadioButtonIcon), new FrameworkPropertyMetadata(typeof(AduRadioButtonIcon)));
- }
- public static readonly DependencyProperty SelectColorProperty = DependencyProperty.Register("SelectColor"
- //, typeof(Brush), typeof(AduRadioButtonIcon), new FrameworkPropertyMetadata(new SolidColorBrush(Color.FromRgb(0,255,255))));
- , typeof(Brush), typeof(AduRadioButtonIcon), new FrameworkPropertyMetadata(new SolidColorBrush(Colors.Lime)));
- /// <summary>
- /// 选中时颜色
- /// </summary>
- public Brush SelectColor
- {
- get { return (Brush)GetValue(SelectColorProperty); }
- set { SetValue(SelectColorProperty, value); }
- }
- public static readonly DependencyProperty SelectBackgroundProperty = DependencyProperty.Register("SelectBackground"
- , typeof(Brush), typeof(AduRadioButtonIcon), new FrameworkPropertyMetadata(new SolidColorBrush(Color.FromArgb(0, 0, 0, 0))));
- /// <summary>
- /// 选中时背景色颜色
- /// </summary>
- public Brush SelectBackground
- {
- get { return (Brush)GetValue(SelectBackgroundProperty); }
- set { SetValue(SelectBackgroundProperty, value); }
- }
- public static readonly DependencyProperty DefaultBackgroundProperty = DependencyProperty.Register("DefaultBackground"
- , typeof(Brush), typeof(AduRadioButtonIcon), new FrameworkPropertyMetadata(new SolidColorBrush(Color.FromArgb(0, 0, 0, 0))));
- /// <summary>
- /// 选中时背景色颜色
- /// </summary>
- public Brush DefaultBackground
- {
- get { return (Brush)GetValue(DefaultBackgroundProperty); }
- set { SetValue(DefaultBackgroundProperty, value); }
- }
- }
- }
|