Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

SvgImageItemAppearance.BorderColor Property

Gets or sets a custom border color applied to an image item.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.Utils.v24.2.dll

NuGet Packages: DevExpress.Utils, DevExpress.Wpf.Core

#Declaration

public Color BorderColor { get; set; }

#Property Value

Type Description
Color

A custom border color.

#Remarks

To paint custom borders for image items:

  • Set the BorderColor property.
  • Set the BorderThickness property to a positive floating point number. Initially, this property value is -1, and thus no custom border is painted.

See BorderThickness for more information.

#Example

The following example applies custom borders for all image items (via the SvgImageBox.ItemAppearance property) and overrides these settings for a specific item (via the SvgImageItem.Appearance property).

image

// The default appearance settings for all items.
svgImageBox1.ItemAppearance.Normal.BorderColor = Color.Black;
svgImageBox1.ItemAppearance.Normal.BorderThickness = 1;

// The appearance settings for a specific item.
var orangeSlice = svgImageBox1.FindItemByTag("orange");
if (orangeSlice != null) {
    orangeSlice.Appearance.Normal.BorderColor = Color.Green;
}
See Also