BaseBindableViewSetPropertyT Method |
Checks if a property already matches a desired value. Sets the property and notifies listeners only when necessary.
Namespace: RAYLASE.Shared.GUIAssembly: RAYLASE.Shared (in RAYLASE.Shared.dll) Version: 2.19.0
Syntaxprotected bool SetProperty<T>(
ref T storage,
T value,
string propertyName = null
)
Parameters
- storage T
- Reference to a property with both getter and setter.
- value T
- Desired value for the property.
- propertyName String (Optional)
- Name of the property used to notify listeners. This value is optional and can be provided automatically when invoked from compilers that support CallerMemberName.
Type Parameters
- T
- Type of the property.
Return Value
BooleanTrue if the value was changed, false if the existing value matched the desired value.
See Also