Version

xamPropertyGrid - BrushEditor Actions

Topic Overview

Purpose

This topic provides information about BrushEditor actions of the XamPropertyGrid™ control.

Note
Note:

These actions will only apply to properties whose editor is the PropertyGridBrushEditorControl .

BrushEditor Actions

AddGradientStop

Description

Adds a gradient stop for the currently selected property.

Note
Note:

This only applies to properties of type System.Windows.Media.Brush .

Parameters

The following table summarizes the action parameters followed by code examples where applicable.

Parameter Description

dGradientLoc

Double value between 0 and 1 (inclusively) to define the location of a gradient stop.

oColor

(Optional) A string value to represent a color. Color conversion is done via the System.Windows.Media.ColorConverter.ConvertFromString recorded as #FF1100FF notation by default. Color names can also be used during replay.

Possible exceptions

The following list contains the possible exceptions to this action and the likely reason causing them.

  • The selected property is not of type Brush.

  • The specified value [dGradientLoc] is out of range.

  • The Color string provided [oColor], was invalid.

MoveGradientStop

Description

Moves the identified gradient stop..

Note
Note:

This only applies to properties of Type System.Windows.Media.Brush .

Parameters

The following table summarizes the action parameters followed by code examples where applicable.

Parameter Description

iGradStopIndex

Integer value representing the index of a gradient stop.

dGradStopLoc

Double value between 0 and 1 (inclusively) to define the location of a gradient stop.

Possible exceptions

The following list contains the possible exceptions to this action and the likely reason causing them.

  • The selected property is not of type Brush.

  • The specified index [iGradStopIndex] is out of range.

RemoveGradientStop

Description

Removes a gradient stop for the currently selected property.

Note
Note:

This only applies to properties of type System.Windows.Media.Brush .

Parameters

The following table summarizes the action parameters followed by code examples where applicable.

Parameter Description

iGradStopIndex

Integer value representing the index of a gradient stop.

Possible exceptions

The following list contains the possible exceptions to this action and the likely reason causing them.

  • The selected property is not of type Brush.

  • The specified index [iGradStopIndex] is out of range.

ReverseGradientStops

Description

Reverse the order of the gradient stops by clicking on the ReverseGradientStops button.

Note
Note:

This only applies to properties of Type System.Windows.Media.Brush .

Parameters

None

Possible exceptions

The following list contains the possible exceptions to this action and the likely reason causing them.

  • The selected property is not of type Brush.

  • The Color string provided [oColor] was invalid.

SelectGradientStop

Description

Selects the identified gradient stop.

Note
Note:

This only applies to properties of Type System.Windows.Media.Brush .

Parameters

The following table summarizes the action parameters followed by code examples where applicable.

Parameter Description

iGradStopIndex

Integer value representing the index of a gradient stop.

Possible exceptions

The following list contains the possible exceptions to this action and the likely reason causing them.

  • The selected property is not of type Brush.

  • The specified index [iGradStopIndex] is out of range.

SetBrushType

Description

Set the type of brush for the currently selected property by clicking on one of the BrushType buttons (None, Solid, Gradient, Linear, Radial, HorizontalLinear, or VerticalLinear).

Note
Note:

This only applies to properties of Type System.Windows.Media.Brush .

Parameters

The following table summarizes the action parameters followed by code examples where applicable.

Parameter Description

oeBrushType

An enumerated value, string name, or integer representing a value from the prpgBrush type enumeration.

Possible exceptions

The following list contains the possible exceptions to this action and the likely reason causing them.

  • The selected property is not of type Brush.

  • The option supplied is not one of the valid options, valid options are [{0}].

SetColor

Description

Sets the current color to the supplied color.

Note
Note:

This only applies to properties of Type System.Windows.Media.Brush .

Parameters

The following table summarizes the action parameters followed by code examples where applicable.

Parameter Description

oColor

A string value to represent a color. Color conversion is done via the System.Windows.Media.ColorConverter.ConvertFromString recorded as #FF1100FF notation by default. Color names can also be used during replay.

Possible exceptions

The following list contains the possible exceptions to this action and the likely reason causing them.

  • The selected property is not of type Brush.

  • The Color string provided [oColor] was invalid.

Related Content

Topics

The following topics provide additional information related to this topic.

Topic Purpose

This topic provides information about recordable actions for testing the XamPropertyGrid™ control.

This topic provides information about replay-only actions for testing the XamPropertyGrid™ control.

This topic provides reference material on the common enumerations used for testing the XamPropertyGrid™ control.

This topic provides reference information about the inspectable test object properties of the XamPropertyGrid™ control.

This topic provides reference information about the XamPropertyGrid™ proxy base custom properties.