Skip to content

7cf19b2b c589 199e 7370 da5bbd8209ab

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

NegativeModel Class

Additional header content

Represents a negative number format. Contains the definition of negative number in a numeric data type.

Inheritance Hierarchy

System.Object
  iTin.Export.Model.BaseModel(NegativeModel)
    iTin.Export.Model.NegativeModel
Namespace: iTin.Export.Model
Assembly: iTin.Export.Core (in iTin.Export.Core.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#

[SerializableAttribute]
public class NegativeModel : BaseModel<NegativeModel>, 
	ICloneable

VB

<SerializableAttribute>
Public Class NegativeModel
	Inherits BaseModel(Of NegativeModel)
	Implements ICloneable

The NegativeModel type exposes the following members.

Constructors

 

Name Description
Public method NegativeModel Initializes a new instance of the NegativeModel class.
  Back to Top

Properties

 

Name Description
Public propertyCode example Color Gets or sets preferred color for display a negative number.
Public property IsDefault Gets a value indicating whether this instance is default. (Overrides BaseModel.IsDefault.)
Public property Properties Gets or sets a reference to user-defined property list for this element. (Inherited from BaseModel(T).)
Public propertyCode example Sign Gets or sets visual format of negative value.
  Back to Top

Methods

 

Name Description
Public method Clone Clones this instance.
Public method Combine Combines this instance with reference parameter.
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetColor Gets a reference to the Color structure preferred for this negative format.
Public method GetHashCode (Inherited from Object.)
Protected method GetStaticBindingValue Gets the static binding value by reflection. (Inherited from BaseModel(T).)
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Public method SaveToFile(String) Saves to file. (Inherited from BaseModel(T).)
Public method SaveToFile(String, Exception) Serializes current BaseModel object into file (Inherited from BaseModel(T).)
Public method Serialize Serializes current BaseModel object into an Xml document. (Inherited from BaseModel(T).)
Public method ToString Returns a string that represents the current object. (Inherited from BaseModel(T).)
  Back to Top

Remarks

ITEE Object Element Usage

<Negative .../>

Attributes

Attribute Optional Description
Color Yes Preferred color for display a negative number. The default is Black.
Sign Yes Visual format of negative value. The default is Standard.
Compatibility table with native writers.
Comma-Separated Values
CsvWriter
Tab-Separated Values
TsvWriter
SQL Script
SqlScriptWriter
XML Spreadsheet 2003
Spreadsheet2003TabularWriter
X X X 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

iTin.Export.Model Namespace

Clone this wiki locally