Class BackgroundColor
Formatting that represents the background color of a field
Inherited Members
Namespace: Sdl.FileTypeSupport.Framework.Formatting
Assembly: Sdl.FileTypeSupport.Framework.Core.dll
Syntax
public class BackgroundColor : AbstractFormattingItem, IFormattingItem, ICloneable
Constructors
BackgroundColor()
Constructs a background color with the default color (Window color from current Windows settings).
Declaration
public BackgroundColor()
BackgroundColor(Color)
Creates formatting that represents a specific background color.
Declaration
public BackgroundColor(Color value)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Color | value |
Properties
LocalizedFormattingName
The localized name of this type of formatting
Declaration
public override string LocalizedFormattingName { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
LocalizedStringValue
Colors are serialized to localized strings either as named colors (e.g. Aquamarine or ActiveWindowTitleText), or as 32-bit hex values in the format determined by the .NET ColorConverter class.
Declaration
public override string LocalizedStringValue { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
Name
The string used as name for this type of formatting.
Declaration
public static string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
Typically used during de-serialization from key/value pair.
StringValue
Colors are serialized to strings either as named colors (e.g. Aquamarine or ActiveWindowTitleText), or as 32-bit hex values in the format determined by the .NET ColorConverter class.
Declaration
public override string StringValue { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
Remarks
Setting this value to null
sets the color to the windows default color.
Value
The color value of this formatting
Declaration
public Color Value { get; set; }
Property Value
Type | Description |
---|---|
System.Drawing.Color |
Methods
AcceptVisitor(IFormattingVisitor)
Calls VisitBackgroundColor(BackgroundColor) on the visitor.
Declaration
public override void AcceptVisitor(IFormattingVisitor visitor)
Parameters
Type | Name | Description |
---|---|---|
IFormattingVisitor | visitor |
Overrides
Clone()
Clones this object
Declaration
public override object Clone()
Returns
Type | Description |
---|---|
System.Object |
Overrides
Equals(Object)
Overridden to consider equivalent colors represented by different values equal
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
GetHashCode()
Overridden to return the same hash code for the same effective color values
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |