Click or drag to resize

PropertyBag Class

Used to store string properties.
Inheritance Hierarchy

Namespace:  Easymap.AddIn.Common
Assembly:  EasyMap.AddIn (in EasyMap.AddIn.dll) Version: 12.0.0.0
Syntax
public class PropertyBag : BaseObject

The PropertyBag type exposes the following members.

Constructors
  NameDescription
Public methodPropertyBag
Initializes a new instance of the PropertyBag class
Top
Properties
  NameDescription
Public propertyCount
Number of items in the store
Public propertyItem
Get, Set a string property by its name
Public propertyKeys
Lists all keys in the propertybag
Public propertyValues
Lists all values in the propertybag
Top
Methods
  NameDescription
Public methodClear
Clear the list
Top
Operators
Remarks
First initialize new PropertyBag with your unique property caption, which identifies your property. Insert userdefined key und userdefined value in initialized PropertyBag. Set Modified.
Examples
Storing properties in EMPX file
private void SaveProperty()
{
    Easymap.AddIn.Common.PropertyBag bag = Application.Current.CurrentDocument.GetProperties("YourUniquePropertyCaption");
    bag["Key"] = "Value";

    Application.Current.CurrentDocument.Modified = true;
}
See Also