Tone
ConsoleMonster
The emphasis an element is painted with: a built-in tone or a named one that the theme defines. Domain facts such as a status or severity map to a tone for paint. The name is the wire spelling, compared without regard to case.
Inheritance
- ValueType
- Tone
Usage
Explore 28 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 17
- Extension method Severity.ToTone
- Extension method StatusKind.ToTone
- Extension method ThemeToken.ToTone
- Method Tones.ToTone
- Method Tone.Named
- Method Tone.Parse
- Property Tone.Danger
- Property Tone.Info
- Property Tone.Muted
- Property Tone.Neutral
- Property Tone.None
- Property Tone.Success
- Property Tone.Warning
- Property MatrixCell.Tone
- Property TableRowRole.MarkerTone
- Property TableRowRole.Tone
- Property TreeNode.MarkerTone
Accepted by parameters 11
- Method Tones.ToToken
- Extension method Tone.ToToken
- Method Tone.Equals
- Method Tone.op_Equality
- Method Tone.op_Equality
- Method Tone.op_Inequality
- Method Tone.op_Inequality
- Method Tone.TryParse
- Method TableCell.WithTone
- Extension method TreeNode.MarkerTone
- Method TreeNodeFluent.MarkerTone
Methods
public bool Equals(Tone other) #Indicates whether the current object is equal to another object of the same type.
Parameters
- other ConsoleMonster.Tone
- An object to compare with this object.
Returns
bool true if the current object is equal to the other parameter; otherwise, false.public override bool Equals(object obj) #Indicates whether this instance and a specified object are equal.
Parameters
- obj object
- The object to compare with the current instance.
Returns
bool true if obj and this instance are the same type and represent the same value; otherwise, false.public override int GetHashCode() #Returns the hash code for this instance.
Returns
int A 32-bit signed integer that is the hash code for this instance.public static Tone Named(string name) #A tone the theme defines by name; a theme without it paints the element as Tone.Neutral.
Parameters
- name string
- Letters, digits, hyphens, underscores and dots.
public static bool op_Equality(Tone left, Tone right) #Whether two tones have the same name.
Parameters
- left ConsoleMonster.Tone
- right ConsoleMonster.Tone
Returns
boolpublic static bool op_Inequality(Tone left, Tone right) #Whether two tones have different names.
Parameters
- left ConsoleMonster.Tone
- right ConsoleMonster.Tone
Returns
boolpublic static Tone Parse(string value) #Reads a built-in or theme-defined tone, ignoring case.
Parameters
- value string
- The name.
public static bool TryParse(string value, out Tone tone) #Reads a built-in or theme-defined tone, ignoring case.
Parameters
- value string
- The name.
- tone ConsoleMonster.Tone
- The tone, when the name is valid.
Returns
bool Whether the name is valid.Inherited Methods
Properties
public static Tone None { get; } #No tone: the element keeps its default paint.
public static Tone Neutral { get; } #A neutral emphasis.
public static Tone Info { get; } #Information.
public static Tone Success { get; } #A good or completed state.
public static Tone Warning { get; } #Something that needs attention.
public static Tone Danger { get; } #A failure or a destructive action.
public static Tone Muted { get; } #De-emphasized content.
public string Name { get; } #The wire spelling: none, a built-in tone or a theme-defined name.
public bool IsNamed { get; } #Whether this is a theme-defined tone rather than a built-in one.