Class DataBinding<TLayerProperty>
Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.
public class DataBinding<TLayerProperty> : IDataBinding, IStorageModel, IDisposable, IPluginFeatureDependent
Type Parameters
TLayerProperty
- Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.
- Inheritance
-
DataBinding<TLayerProperty>
- Implements
Properties
BaseLayerProperty
Gets the layer property the data binding is applied to
public ILayerProperty BaseLayerProperty { get; }
Property Value
Entity
Gets the data binding entity this data binding uses for persistent storage
public DataBindingEntity Entity { get; }
Property Value
- DataBindingEntity
IsEnabled
Gets a boolean indicating whether the data binding is enabled or not
public bool IsEnabled { get; set; }
Property Value
LayerProperty
Gets the layer property this data binding targets
public LayerProperty<TLayerProperty> LayerProperty { get; }
Property Value
- LayerProperty<TLayerProperty>
Properties
Gets a list of sub-properties this data binding applies to
public ReadOnlyCollection<IDataBindingProperty> Properties { get; }
Property Value
Script
Gets the script used to populate the data binding
public INodeScript Script { get; }
Property Value
Methods
Apply()
Applies the pending value of the data binding to the property
public void Apply()
ClearDataBindingProperties()
Removes all data binding properties so they are no longer available to the data binding system
public void ClearDataBindingProperties()
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Dispose(bool)
Releases the unmanaged resources used by the object and optionally releases the managed resources.
protected virtual void Dispose(bool disposing)
Parameters
disposing
booltrue to release both managed and unmanaged resources; false to release only unmanaged resources.
GetFeatureDependencies()
Gets the plugin features this class depends on, may contain the same plugin feature twice if depending on it in multiple ways.
public IEnumerable<PluginFeature> GetFeatureDependencies()
Returns
- IEnumerable<PluginFeature>
A List<T> of PluginFeature this class depends on.
Load()
Loads the model from its associated entity
public void Load()
LoadNodeScript()
If the data binding is enabled, loads the node script for that data binding
public void LoadNodeScript()
OnDataBindingDisabled(DataBindingEventArgs)
Invokes the DataBindingDisabled event
protected virtual void OnDataBindingDisabled(DataBindingEventArgs e)
Parameters
OnDataBindingEnabled(DataBindingEventArgs)
Invokes the DataBindingEnabled event
protected virtual void OnDataBindingEnabled(DataBindingEventArgs e)
Parameters
OnDataBindingPropertiesCleared()
Invokes the DataBindingPropertiesCleared event
protected virtual void OnDataBindingPropertiesCleared()
OnDataBindingPropertyRegistered()
Invokes the DataBindingPropertyRegistered event
protected virtual void OnDataBindingPropertyRegistered()
RegisterDataBindingProperty<TProperty>(Func<TProperty>, Action<TProperty?>, string)
Registers a data binding property so that is available to the data binding system
public DataBindingProperty<TProperty> RegisterDataBindingProperty<TProperty>(Func<TProperty> getter, Action<TProperty?> setter, string displayName)
Parameters
getter
Func<TProperty>The function to call to get the value of the property
setter
Action<TProperty>The action to call to set the value of the property
displayName
stringThe display name of the data binding property
Returns
- DataBindingProperty<TProperty>
Type Parameters
TProperty
The type of the layer property
Save()
Saves the model to its associated entity
public void Save()
Update()
Updates the pending values of this data binding
public void Update()
Events
DataBindingDisabled
Occurs when a data binding has been disabled
public event EventHandler<DataBindingEventArgs>? DataBindingDisabled
Event Type
DataBindingEnabled
Occurs when a data binding has been enabled
public event EventHandler<DataBindingEventArgs>? DataBindingEnabled
Event Type
DataBindingPropertiesCleared
Occurs when all data binding properties have been removed
public event EventHandler<DataBindingEventArgs>? DataBindingPropertiesCleared
Event Type
DataBindingPropertyRegistered
Occurs when a data binding property has been added
public event EventHandler<DataBindingEventArgs>? DataBindingPropertyRegistered