Create property types. More...
Public Member Functions | |
Property | CloneProperty (Property source, string name) |
Creates a property type by cloning an existing property type. More... | |
CustomEnumProperty | CreateCustomEnumProperty (string name, string displayName, string category, Dictionary< string, int > options) |
Creates a property type of the enumeration data type. More... | |
FloatProperty | CreateFloatProperty (string name, string displayName, string category, float?lowerBound, float?upperBound, float?step) |
Creates a property type of the float data type. More... | |
IntProperty | CreateIntProperty (string name, string displayName, string category, int?lowerBound, int?upperBound, int?step) |
Creates a property type of the integer data type. More... | |
MessageProperty | CreateMessageProperty (string name, string displayName, string category, IEnumerable< Property > argumentProperties) |
Property | CreateProperty (Type dataType, string name, string displayName, string category) |
Creates a property type of data type you specify. More... | |
TypedProperty< T > | CreateProperty< T > (string name, string displayName, string category) |
Creates a property type of data type you specify. More... | |
Vector2DProperty | CreateVector2DProperty (string name, string displayName, string category, Vector?lowerBound, Vector?upperBound, Vector?step) |
Creates a property type of the vector 2D data type. More... | |
Vector3DProperty | CreateVector3DProperty (string name, string displayName, string category, Vector3D?lowerBound, Vector3D?upperBound, Vector3D?step) |
Creates a property type of the vector 3D data type. More... | |
Vector4DProperty | CreateVector4DProperty (string name, string displayName, string category, Quaternion?lowerBound, Quaternion?upperBound, Quaternion?step) |
Creates a property type of the vector 4D data type. More... | |
void | DeleteProperty (Property property) |
Deletes a property type from the Property Types library. More... | |
IEnumerable< PropertyEditor > | GetCompatiblePropertyEditors (Property property) |
Gets the property editors that Kanzi Studio can use to set the value of a property. More... | |
Property | GetProperty (string name) |
Gets the property type with the given name. More... | |
Public Member Functions inherited from ChildContainer | |
string | GenerateUniqueChildName (string defaultName) |
Generates a unique name. More... | |
string | GetInvalidityReasonOfNewName (string newName) |
Returns the reason why the passed name is not valid. More... | |
Properties | |
IEnumerable< Property > | DefaultPropertyTypes [get] |
Gets the default Kanzi property types. More... | |
IEnumerable< Property > | ProjectPropertyTypes [get] |
Gets the property types stored in the Property Types library. More... | |
IEnumerable< PropertyEditor > | PropertyEditors [get] |
Create property types.
PropertyTypeLibrary stores the property types declared in the current Kanzi Studio project.
Creates a property type by cloning an existing property type.
The new property type inherits from the source property all its properties except for the name.
source | Source property type. |
name | Name of property type. To avoid naming clashes, make sure that you use a unique name. |
Examples
To clone a property type:
CustomEnumProperty CreateCustomEnumProperty | ( | string | name, |
string | displayName, | ||
string | category, | ||
Dictionary< string, int > | options | ||
) |
Creates a property type of the enumeration data type.
name | The name of the property that you use with the Kanzi Engine API. The name must be unique among the property types and must not contain spaces. |
displayName | The name of the property as it is shown in Kanzi Studio. |
category | The category in which Kanzi Studio shows this property type. |
options | A set of key value pairs. |
Examples
To create a property type of the enumeration data type:
FloatProperty CreateFloatProperty | ( | string | name, |
string | displayName, | ||
string | category, | ||
float? | lowerBound, | ||
float? | upperBound, | ||
float? | step | ||
) |
Creates a property type of the float data type.
name | The name of the property that you use with the Kanzi Engine API. The name must be unique among the property types and must not contain spaces. |
displayName | The name of the property as it is shown in Kanzi Studio. |
category | The category in which Kanzi Studio shows this property type. |
lowerBound | The lower value limit of the property. To use the default value of the data type, set to null. |
upperBound | The upper value limit of the property. To use the default value of the data type, set to null. |
step | The minimum amount by which the value of the property can change. To use the default value of the data type, set to null. |
Examples
To create a property type of the float data type:
IntProperty CreateIntProperty | ( | string | name, |
string | displayName, | ||
string | category, | ||
int? | lowerBound, | ||
int? | upperBound, | ||
int? | step | ||
) |
Creates a property type of the integer data type.
name | The name of the property that you use with the Kanzi Engine API. The name must be unique among the property types and must not contain spaces. |
displayName | The name of the property as it is shown in Kanzi Studio. |
category | The category in which Kanzi Studio shows this property type. |
lowerBound | The lower value limit of the property. To use the default value of the data type, set to null. |
upperBound | The upper value limit of the property. To use the default value of the data type, set to null. |
step | The minimum amount by which the value of the property can change. To use the default value of the data type, set to null. |
Examples
To create a property type of the integer data type:
Property CreateProperty | ( | Type | dataType, |
string | name, | ||
string | displayName, | ||
string | category | ||
) |
Creates a property type of data type you specify.
The property type you create with this function uses the default values for each new property type. For example, when you create a property type of integer data type, the values for the Lower Bound, Upper Bound, and Step are not defined. Note that to create some property types you need to include the correct using directive. For example, to create a property type of the vector 2D data type you need to include the System.Windows using directive.
dataType | The data type of the property type. |
name | The name of the property that you use with the Kanzi Engine API. The name must be unique among the property types and must not contain spaces. |
displayName | The name of the property as it is shown in Kanzi Studio. |
category | The category in which Kanzi Studio shows this property type. |
Examples
To create property types of different data types:
TypedProperty<T> CreateProperty< T > | ( | string | name, |
string | displayName, | ||
string | category | ||
) |
Creates a property type of data type you specify.
The property type you create with this function uses the default values for each new property type. For example, when you create a property type of integer data type, the values for the Lower Bound, Upper Bound, and Step are not defined. Note that to create some property types you need to include the correct using directive. For example, to create a property type of the vector 2D data type you need to include the System.Windows using directive.
T | The data type of the property type. |
name | The name of the property that you use with the Kanzi Engine API. The name must be unique among the property types and must not contain spaces. |
displayName | The name of the property as it is shown in Kanzi Studio. |
category | The category in which Kanzi Studio shows this property type. |
Examples
To create property types of different data types:
Vector2DProperty CreateVector2DProperty | ( | string | name, |
string | displayName, | ||
string | category, | ||
Vector? | lowerBound, | ||
Vector? | upperBound, | ||
Vector? | step | ||
) |
Creates a property type of the vector 2D data type.
Note that to create a vector 2D data type you need to add the using directive for the System.Windows namespace.
name | The name of the property that you use with the Kanzi Engine API. The name must be unique among the property types and must not contain spaces. |
displayName | The name of the property as it is shown in Kanzi Studio. |
category | The category in which Kanzi Studio shows this property type. |
lowerBound | The lower value limit of the property. To use the default value of the data type, set to null. |
upperBound | The upper value limit of the property. To use the default value of the data type, set to null. |
step | The minimum amount by which the value of the property can change. To use the default value of the data type, set to null. |
Examples
To create a property type of the Vector2D data type:
Vector3DProperty CreateVector3DProperty | ( | string | name, |
string | displayName, | ||
string | category, | ||
Vector3D? | lowerBound, | ||
Vector3D? | upperBound, | ||
Vector3D? | step | ||
) |
Creates a property type of the vector 3D data type.
Note that to create a vector 3D data type you need to add the using directive for the System.Windows.Media.Media3D namespace.
name | The name of the property that you use with the Kanzi Engine API. The name must be unique among the property types and must not contain spaces. |
displayName | The name of the property as it is shown in Kanzi Studio. |
category | The category in which Kanzi Studio shows this property type. |
lowerBound | The lower value limit of the property. To use the default value of the data type, set to null. |
upperBound | The upper value limit of the property. To use the default value of the data type, set to null. |
step | The minimum amount by which the value of the property can change. To use the default value of the data type, set to null. |
Examples
To create a property type of the Vector3D data type:
Vector4DProperty CreateVector4DProperty | ( | string | name, |
string | displayName, | ||
string | category, | ||
Quaternion? | lowerBound, | ||
Quaternion? | upperBound, | ||
Quaternion? | step | ||
) |
Creates a property type of the vector 4D data type.
Note that to create a vector 4D data type you need to add the using directive for the System.Windows.Media.Media3D namespace.
name | The name of the property that you use with the Kanzi Engine API. The name must be unique among the property types and must not contain spaces. |
displayName | The name of the property as it is shown in Kanzi Studio. |
category | The category in which Kanzi Studio shows this property type. |
lowerBound | The lower value limit of the property. To use the default value of the data type, set to null. |
upperBound | The upper value limit of the property. To use the default value of the data type, set to null. |
step | The minimum amount by which the value of the property can change. To use the default value of the data type, set to null. |
Examples
To create a property type of the Vector4D data type:
void DeleteProperty | ( | Property | property | ) |
Deletes a property type from the Property Types library.
Note that you cannot delete Kanzi default property types or property types provided by a plugin.
property | The property type you want to delete. |
Examples
To delete a property type:
IEnumerable<PropertyEditor> GetCompatiblePropertyEditors | ( | Property | property | ) |
Gets the property editors that Kanzi Studio can use to set the value of a property.
property | The property. |
Property GetProperty | ( | string | name | ) |
Gets the property type with the given name.
The property type can be either:
name | Name of the property. |
|
get |
Gets the default Kanzi property types.
Lists also the property types provided by Kanzi Engine plugins.
Examples
To get all default Kanzi property types:
|
get |
Gets the property types stored in the Property Types library.
Examples
To get all property types in the Property Types library: