VisualAddCustomProperty(String, Object, String) Method |
Add a custom property to the visual. If the custom property already exists, then this call will update its value and description.
Namespace: Demo3D.VisualsAssembly: Demo3D.Core (in Demo3D.Core.dll) Version: 19.00.00
Syntaxpublic CustomProperty AddCustomProperty(
string name,
Object val,
string description
)
Parameters
- name String
- Name of custom property to create.
- val Object
- Initial value of custom property.
- description String
- Description of the property, shown in the property grid
Return Value
CustomPropertyA newly-created or updated CustomProperty object
Example
sender.AddCustomProperty("Label", "X", "My Label property");
var cp = sender.AddCustomProperty("Label", "X", "My Label property");
cp.Category = "My Properties";
sender.AddCustomProperty(
"Label",
"X",
"My Label property"
).Category = "My Properties";
See Also