In This Article

BrushPicker Class

Represents a Brush picker.

[TemplatePart(Name = "PART_BrushKindSelector", Type = typeof(Selector))]
[TemplatePart(Name = "PART_GradientStopSlider", Type = typeof(GradientStopSlider))]
public class BrushPicker : PickerBase, DUCE.IResource, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IHaveResources, IQueryAmbient
Inheritance:
Object DispatcherObject DependencyObject Visual UIElement FrameworkElement Control PickerBase Object

Constructors

BrushPicker()

Initializes an instance of the BrushPicker class.

public BrushPicker()

Properties

AddGradientStopButtonToolTip

Gets or sets the tooltip for the add gradient stop button.

public object AddGradientStopButtonToolTip { get; set; }

Property Value

Object:

The tooltip for the add gradient stop button.

BrushKind

Gets a BrushKind indicating the kind of brush that is being edited.

public BrushKind BrushKind { get; }

Property Value

BrushKind:

A BrushKind indicating the kind of brush that is being edited.

CanReuseBrush

Gets or sets 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

Boolean:

true if the Brush value 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 is true.

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

Gets or sets whether the alpha channel (transparency) of the brush value colors are enabled.

public bool IsAlphaEnabled { get; set; }

Property Value

Boolean:

true if the alpha channel (transparency) of the brush value colors is enabled; otherwise, false. The default value is true.

Remarks

When disabled, no transparency is supported.

IsGradient

Gets whether the brush being edited is a GradientBrush.

public bool IsGradient { get; }

Property Value

Boolean:

true if the brush being edited is a GradientBrush; otherwise, false.

IsGradientAllowed

Gets or sets whether gradient brush values can be entered.

public bool IsGradientAllowed { get; set; }

Property Value

Boolean:

true if gradient brush values can be entered; otherwise, false. The default value is true.

IsNull

Gets whether the brush being edited is a null value.

public bool IsNull { get; }

Property Value

Boolean:

true if the brush being edited is a null value; otherwise, false.

IsNullAllowed

Gets or sets a value indicating whether null values are allowed to be entered by the user.

public bool IsNullAllowed { get; set; }

Property Value

Boolean:

true if null values are allowed to be entered by the user; otherwise false. The default value is true.

RemoveGradientStopButtonToolTip

Gets or sets the tooltip for the remove gradient stop button.

public object RemoveGradientStopButtonToolTip { get; set; }

Property Value

Object:

The tooltip for the remove gradient stop button.

ReverseGradientStopsButtonToolTip

Gets or sets the tooltip for the reverse gradient stops button.

public object ReverseGradientStopsButtonToolTip { get; set; }

Property Value

Object:

The tooltip for the reverse gradient stops button.

SelectedColor

Gets or sets the currently selected Color.

public Color SelectedColor { get; set; }

Property Value

Color:

The currently selected Color.

Value

Gets or sets the value of the control.

public Brush Value { get; set; }

Property Value

Brush:

The value of the control.

Methods

OnApplyTemplate()

Invoked whenever application code or internal processes call ApplyTemplate.

public override void OnApplyTemplate()

Events

ValueChanged

Occurs after the Value property value changes.

public event EventHandler ValueChanged

Event Type

EventHandler

Fields

AddGradientStopButtonToolTipProperty

Identifies the AddGradientStopButtonToolTip dependency property. This field is read-only.

public static readonly DependencyProperty AddGradientStopButtonToolTipProperty

BrushKindProperty

Identifies the BrushKind dependency property. This field is read-only.

public static readonly DependencyProperty BrushKindProperty

CanReuseBrushProperty

Identifies the CanReuseBrush dependency property. This field is read-only.

public static readonly DependencyProperty CanReuseBrushProperty

IsAlphaEnabledProperty

Identifies the IsAlphaEnabled dependency property. This field is read-only.

public static readonly DependencyProperty IsAlphaEnabledProperty

IsGradientAllowedProperty

Identifies the IsGradientAllowed dependency property. This field is read-only.

public static readonly DependencyProperty IsGradientAllowedProperty

IsGradientProperty

Identifies the IsGradient dependency property. This field is read-only.

public static readonly DependencyProperty IsGradientProperty

IsNullAllowedProperty

Identifies the IsNullAllowed dependency property. This field is read-only.

public static readonly DependencyProperty IsNullAllowedProperty

IsNullProperty

Identifies the IsNull dependency property. This field is read-only.

public static readonly DependencyProperty IsNullProperty

RemoveGradientStopButtonToolTipProperty

Identifies the RemoveGradientStopButtonToolTip dependency property. This field is read-only.

public static readonly DependencyProperty RemoveGradientStopButtonToolTipProperty

ReverseGradientStopsButtonToolTipProperty

Identifies the ReverseGradientStopsButtonToolTip dependency property. This field is read-only.

public static readonly DependencyProperty ReverseGradientStopsButtonToolTipProperty

SelectedColorProperty

Identifies the SelectedColor dependency property. This field is read-only.

public static readonly DependencyProperty SelectedColorProperty

ValueProperty

Identifies the Value dependency property. This field is read-only.

public static readonly DependencyProperty ValueProperty

Inherited Members

Extension Methods