Skip to content

8141b4e1 b53b ad63 975e 0115611e664a

Fernando Garcia edited this page May 8, 2018 · 1 revision

NegativeModel.Color Property

Additional header content

Gets or sets preferred color for display a negative number.

Namespace: iTin.Export.Model
Assembly: iTin.Export.Core (in iTin.Export.Core.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#

public KnownBasicColor Color { get; set; }

VB

Public Property Color As KnownBasicColor
	Get
	Set

Property Value

Type: KnownBasicColor
Preferred color for display a negative number. The default is Black.

Exceptions

 

Exception Condition
InvalidEnumArgumentException The value specified is outside the range of valid values.

Remarks

ITEE Object Element Usage

<Negative Color="Black|Blue|Cyan|Green|Magenta|Red|Yellow|White" .../>

Compatibility table with native writers.

Comma-Separated Values
CsvWriter
Tab-Separated Values
TsvWriter
SQL Script
SqlScriptWriter
XML Spreadsheet 2003
Spreadsheet2003TabularWriter
No has effect No has effect No has effect X
A X value indicates that the writer supports this element.

Examples

In the following example shows how create a new style. XML

<Style Name="TopAggregate">
  <Content Color="#C9C9C9">
    <Alignment Horizontal="Center"/>
    <Number Decimals="0" Separator="Yes">
      <Negative Color="Yellow" Sign="Brackets"/>
    </Number>
  </Content>
  <Font Name="Segoe UI" Size="12" Color="Navy" Bold="Yes"/>
</Style>

C#

StyleModel style = new StyleModel
                       {
                           Name = "TopAggregate",
                           Content = new ContentModel
                                         {
                                             Color = "#C9C9C9",
                                             Alignment = new ContentAlignmentModel
                                                             {
                                                                 Horizontal = KnownHorizontalAlignment.Center
                                                             },
                                             DataType = new NumberDataTypeModel
                                                            {
                                                                Decimals = 0,
                                                                Separator = YesNo.Yes,
                                                                Negative = new NegativeModel
                                                                               {
                                                                                   Color = KnownBasicColor.Yellow,
                                                                                   Sign = KnownNegativeSign.Brackets
                                                                               }
                                                            }
                                         }, 
                           Font = new FontModel
                                      {
                                          Color = "Navy",
                                          Bold = YesNo.Yes,
                                          Size = 12
                                      }
                       };

See Also

Reference

NegativeModel Class
iTin.Export.Model Namespace

Clone this wiki locally