Cursor.SelectionColor 属性

定义

获取或设置突出显示某一范围数据的半透明颜色。Gets or sets a semi-transparent color that highlights a range of data.

public:
 property System::Drawing::Color SelectionColor { System::Drawing::Color get(); void set(System::Drawing::Color value); };
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color SelectionColor { get; set; }
[<System.ComponentModel.Bindable(true)>]
[<System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))>]
member this.SelectionColor : System.Drawing.Color with get, set
Public Property SelectionColor As Color

属性值

Color

突出显示范围的颜色。The color of the highlighted range. 默认值为 LightGray,其 alpha 值为 120。The default value is LightGray, with an alpha value of 120.

属性

注解

此属性确定范围选择的颜色,可以设置为任何有效的 ARGB (alpha、红色、绿色、蓝色) 值。This property determines the color of the range selection, and can be set to any valid ARGB (alpha, red, green, blue) value. 如果未提供确定透明度级别的 alpha 值,则使用默认的 alpha 值120。If an alpha value, which determines the level of transparency, is not provided, a default alpha value of 120 is used.

可以为 X 轴和 Y 轴游标设置所选颜色,这是使用 CursorX 对象的和 CursorY 属性分别实现的 ChartAreaThe selected color can be set for both the X and Y axis cursors, which is implemented using the CursorX and CursorY properties of the ChartArea object, respectively. 如果在 X 轴上只选择范围,则 SelectionColor 使用 x 轴游标的值; 如果在 y 轴上仅选择了范围,则 SelectionColor 使用 y 轴游标的值。If a range is only selected along the X-axis, the SelectionColor value for the X-axis cursor is used; if a range is only selected along the Y-axis, the SelectionColor value for the Y-axis cursor is used. 如果沿两个轴都选择了范围,则 SelectionColor Y 轴游标的值也用于选定的颜色。If a range is selected along both axes, the SelectionColor value for the Y-axis cursor is also used for the selected color.

适用于