Skip to content

b8ee97bc 60e3 f96b 5962 451609e212db

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

ContentModel.DataType Property

Additional header content

Gets or sets content data type.

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 BaseDataTypeModel DataType { get; set; }

VB

Public Property DataType As BaseDataTypeModel
	Get
	Set

Property Value

Type: BaseDataTypeModel
Reference to content data type.

Remarks

ITEE Object Element Usage

<Content>
  <Number/> | <Currency/> | <Percentage/> | <Scientific/> | <Datetime/> | <Special/> | <Text/>
  ...
</Content>

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 text content. XML

<Content Color="DarkBlue">
  <Alignment Horizontal="Left"/>
  <Text/>
</Content>

C#

var content = new ContentModel
{
    Color = "DarkBlue",
    DataType = new TextDataTypeModel(),
    Alignment = new ContentAlignmentModel { Horizontal = KnownHorizontalAlignment.Left }
};

VB

Dim content = New ContentModel With
{
    .Color = "DarkBlue",
    .DataType = New TextDataTypeModel(),
    .Alignment = New ContentAlignmentModel With { .Horizontal = KnownHorizontalAlignment.Left }
}

In the following example shows how create a new currency content.

XML

<Content Color="Beige">
  <Alignment Vertical="Bottom" Horizontal="Right"/>
  <Currency Decimals="1" Locale="mk">
    <Negative Color="Red" Sign="Parenthesis"/>
  </Currency>
</Content>

C#

var content = new ContentModel
{
    Color = "Beige",
    Alignment = new ContentAlignmentModel 
    { 
        Horizontal = KnownHorizontalAlignment.Left, 
        Vertical = KnownVerticalAlignment.Bottom 
    },
    DataType = new CurrencyDataTypeModel
    { 
        Decimals = 1,
        Locale = KnownCulture.mk,
        Negative = new NegativeModel
        {
            Color = KnownBasicColor.Red,
            Sign = KnownNegativeSign.Parenthesis
        }
    }
};

VB

Dim content = New ContentModel With
{
    .Color = "Beige",
    .Alignment = New ContentAlignmentModel With
     { 
         .Horizontal = KnownHorizontalAlignment.Left, 
         .Vertical = KnownVerticalAlignment.Bottom 
     },
    .DataType = New CurrencyDataTypeModel With
     { 
         .Decimals = 1,
         .Locale = KnownCulture.mk,
         .Negative = New NegativeModel With
          {
              .Color = KnownBasicColor.Red,
              .Sign = KnownNegativeSign.Parenthesis
          }
     }
}

See Also

Reference

ContentModel Class
iTin.Export.Model Namespace

Clone this wiki locally