Class Item
An abstract base class that provides basic functionality for any descended Item class.
Inheritance
Inherited Members
Namespace: Neodynamic.SDK.Printing
Assembly: cs.temp.dll.dll
Syntax
public abstract class Item : IXmlTemplate, INotifyPropertyChanged
Properties
CacheItemId
Gets or sets the ID which will be assigned to the item in the cache. It must be a unique ID value for each item. The ID must be 1 to 8 alphanumeric [A-Z][0-9] characters long. If it's empty, then a random ID will be assigned automatically at runtime. Default value is an empty string
Declaration
public string CacheItemId { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Comments
Gets or sets the comments associated to this item. Default is an empty string.
Declaration
public string Comments { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
DataField
Gets or sets the name of the field from the data source that contains the values to bind to this item. Default value is an empty string
Declaration
public string DataField { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
DataFieldFormatString
Gets or sets the string that specifies the display format for the value of the data field. Default value is an empty string
Declaration
public string DataFieldFormatString { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Remarks
The format syntax must be the same used for the System.String.Format() method of .NET Framework.
Dpi
Gets or sets the item resolution, in dots per inch.
Declaration
public double Dpi { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Editable
Gets or sets whether this item can be edited in the visual editor surface. Default is true.
Declaration
public bool Editable { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Remarks
If an Item is not editable, this means that it cannot be modified nor removed in the visual editor. It acts as a mandatory item that cannot be edited by the end user.
Locked
Gets or sets whether this item cannot be inadvertently moved nor resized in the visual editor surface. Default is false.
Declaration
public bool Locked { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Name
Gets or sets the programmatic identifier or name assigned to the item. Default value is an empty string
Declaration
public string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
PrintAsGraphic
Gets or sets whether the item's output is forced to be printed as a graphic. Default is false.
Declaration
public bool PrintAsGraphic { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Tag
Gets or sets an arbitrary string value that can be used to store custom information about this item. Default is an empty string.
Declaration
public string Tag { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
UnitType
Gets or sets the Unit of Measurement for the item.
Declaration
public UnitType UnitType { get; set; }
Property Value
| Type | Description |
|---|---|
| UnitType |
UseCache
Gets or sets whether the item should be cached in the printer's memory. An item cannot be cached if it's bound to some data source field through the DataField property. Default value is false
Declaration
public bool UseCache { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Remarks
An item should be cached if it displays fixed or static content, for instance, items which display company logos, industry symbols, text messages, etc. By caching this kind of items, you will get a better printing performance.
X
Gets or sets the x-coordinate of the upper-left corner of the item relative to the upper-left corner of its container. Default value is 0 (zero)
Declaration
public double X { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Y
Gets or sets the y-coordinate of the upper-left corner of the item relative to the upper-left corner of its container. Default value is 0 (zero)
Declaration
public double Y { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Methods
Clone()
When overridden in a derived class, creates an exact copy of this Item object.
Declaration
public abstract Item Clone()
Returns
| Type | Description |
|---|---|
| Item | The new Item object that this method creates. |
ConvertToUnit(UnitType)
Converts the properties' values from the current Unit to the new specified Unit.
Declaration
public virtual void ConvertToUnit(UnitType unit)
Parameters
| Type | Name | Description |
|---|---|---|
| UnitType | unit |
OnPropertyChanged(Item, String)
Declaration
protected void OnPropertyChanged(Item sender, string propertyName)
Parameters
| Type | Name | Description |
|---|---|---|
| Item | sender | |
| System.String | propertyName |
UpdateFrom(Item)
When overridden in a derived class, updates this Item object with the properties of the specified Item object.
Declaration
public abstract void UpdateFrom(Item item)
Parameters
| Type | Name | Description |
|---|---|---|
| Item | item |
Events
PropertyChanged
Occurs when a property value changes.
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
| Type | Description |
|---|---|
| PropertyChangedEventHandler |