Show / Hide Table of Contents

Struct Attribute

Attributes are used as elements that contain both a foreground and a background or platform specific features

Namespace: Terminal.Gui
Assembly: Terminal.Gui.dll
Syntax
public struct Attribute
Remarks

Attributes are needed to map colors to terminal capabilities that might lack colors, on color scenarios, they encode both the foreground and the background color and are used in the ColorScheme class to define color schemes that can be used in your application.

Constructors

Attribute(Int32)

Initializes a new instance of the Attribute struct.

Declaration
public Attribute (int value);
Parameters
Type Name Description
System.Int32 value

Value.

Methods

Make(Color, Color)

Creates an attribute from the specified foreground and background.

Declaration
public static Terminal.Gui.Attribute Make (Terminal.Gui.Color foreground, Terminal.Gui.Color background);
Parameters
Type Name Description
Color foreground

Foreground color to use.

Color background

Background color to use.

Returns
Type Description
Attribute

The make.

Operators

op_Implicit(Int32 to Attribute)

Implicitly convert an integer value into an attribute

Declaration
public static Terminal.Gui.Attribute op_Implicit (int v);
Parameters
Type Name Description
System.Int32 v

value

Returns
Type Description
Attribute

An attribute with the specified integer value.

op_Implicit(Attribute to Int32)

Implicit conversion from an attribute to the underlying Int32 representation

Declaration
public static int op_Implicit (Terminal.Gui.Attribute c);
Parameters
Type Name Description
Attribute c

The attribute to convert

Returns
Type Description
System.Int32

The integer value stored in the attribute.

Back to top Copyright © 2015-2017 Microsoft
Generated by DocFX