CaptchaImageProperties.BorderColor Property

Gets or sets the challenge image‘s border color.

Namespace: DevExpress.Web.Captcha

Assembly: DevExpress.Web.v21.1.dll

Declaration

[DefaultValue(typeof(Color), "#a8a8a8")]
public Color BorderColor { get; set; }

Property Value

Type Default Description
Color

“#a8a8a8”

A Color object that represents the border color.

Remarks

Use the BorderColor property to specify the border color. This property is set using a Color object.

Example

The following part of the ASPxCaptcha - Features online demo illustrates how to customize the challenge image‘s style settings.

These settings are specified within a panel (ASPxComboBox, ASPxColorEdit editors) and applied to the captcha control via the Apply button (ASPxButton).

protected void btnApply_Click(object sender, EventArgs e) {
...
    int parseResult = 0;
    Captcha.ChallengeImage.FontFamily = cbFontFamily.Value.ToString();
    Captcha.ChallengeImage.ForegroundColor = ceForegroundColor.Color;
    Captcha.ChallengeImage.BackgroundColor = ceBackgroundColor.Color;
    Captcha.ChallengeImage.BorderColor = ceBorderColor.Color;
    if (int.TryParse(seBorderWidth.Text, out parseResult))
        Captcha.ChallengeImage.BorderWidth = parseResult;
...
}
See Also