BrushPicker Class
Represents a Brush picker.
[TemplatePart(Name = "PART_BrushKindSelector", Type = typeof(Selector))]
[TemplatePart(Name = "PART_GradientStopSlider", Type = typeof(GradientStopSlider))]
public class BrushPicker : PickerBase
- Inheritance:
- object Visual UIElement FrameworkElement Control PickerBase object
Constructors
BrushPicker()
Initializes an instance of the class.
public BrushPicker()
Properties
AddGradientStopButtonToolTip
The tooltip for the add gradient stop button.
BrushKind
A BrushKind indicating the kind of brush that is being edited.
CanReuseBrush
Indicates whether the Brush value can simply have components like gradient stops updated instead of requiring a new brush to be created on any update.
public bool CanReuseBrush { get; set; }
Property Value
- bool:
trueif theBrushvalue can simply have components like gradient stops updated instead of requiring a new brush to be created on any update; otherwise,false. The default value istrue.
Remarks
Set this to false in scenarios where ValueChanged events need to fire on any update, or when binding to Value using value converters.
IsAlphaEnabled
Indicates whether the alpha channel (transparency) of the brush value colors are enabled.
public bool IsAlphaEnabled { get; set; }
Property Value
- bool:
trueif the alpha channel (transparency) of the brush value colors is enabled; otherwise,false. The default value istrue.
Remarks
When disabled, no transparency is supported.
IsGradient
Indicates whether the brush being edited is a GradientBrush.
public bool IsGradient { get; }
Property Value
- bool:
trueif the brush being edited is a GradientBrush; otherwise,false.
IsGradientAllowed
Indicates whether gradient brush values can be entered.
public bool IsGradientAllowed { get; set; }
Property Value
- bool:
trueif gradient brush values can be entered; otherwise,false. The default value istrue.
IsNull
Indicates whether the brush being edited is a null value.
public bool IsNull { get; }
Property Value
- bool:
trueif the brush being edited is a null value; otherwise,false.
IsNullAllowed
Indicates whether null values are allowed to be entered by the user.
public bool IsNullAllowed { get; set; }
Property Value
- bool:
trueif null values are allowed to be entered by the user; otherwisefalse. The default value istrue.
RemoveGradientStopButtonToolTip
The tooltip for the remove gradient stop button.
ReverseGradientStopsButtonToolTip
The tooltip for the reverse gradient stops button.
SelectedColor
The currently selected Color.
Value
Vhe value of the control.
Methods
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate().
public override void OnApplyTemplate()
Events
ValueChanged
Occurs after the Value property value changes.
Fields
AddGradientStopButtonToolTipProperty
Defines the AddGradientStopButtonToolTip property.
public static readonly DependencyProperty AddGradientStopButtonToolTipProperty
BrushKindProperty
Defines the BrushKind property.
public static readonly DependencyProperty BrushKindProperty
CanReuseBrushProperty
Defines the CanReuseBrush property.
public static readonly DependencyProperty CanReuseBrushProperty
IsAlphaEnabledProperty
Defines the IsAlphaEnabled property.
public static readonly DependencyProperty IsAlphaEnabledProperty
IsGradientAllowedProperty
Defines the IsGradientAllowed property.
public static readonly DependencyProperty IsGradientAllowedProperty
IsGradientProperty
Defines the IsGradient property.
public static readonly DependencyProperty IsGradientProperty
IsNullAllowedProperty
Defines the IsNullAllowed property.
public static readonly DependencyProperty IsNullAllowedProperty
IsNullProperty
Defines the IsNull property.
public static readonly DependencyProperty IsNullProperty
RemoveGradientStopButtonToolTipProperty
Defines the RemoveGradientStopButtonToolTip property.
public static readonly DependencyProperty RemoveGradientStopButtonToolTipProperty
ReverseGradientStopsButtonToolTipProperty
Defines the ReverseGradientStopsButtonToolTip property.
public static readonly DependencyProperty ReverseGradientStopsButtonToolTipProperty
SelectedColorProperty
Defines the SelectedColor property.
public static readonly DependencyProperty SelectedColorProperty
ValueProperty
Defines the Value property.
public static readonly DependencyProperty ValueProperty