Class AbstractBindable
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
Inherited Members
Namespace: RGB.NET.Core
Assembly: RGB.NET.Core.dll
Syntax
public abstract class AbstractBindable : IBindable, INotifyPropertyChanged
Methods
| Edit this page View SourceOnPropertyChanged(string?)
Triggers the PropertyChanged-event when a a property value has changed.
Declaration
protected void OnPropertyChanged(string? propertyName = null)
Parameters
Type | Name | Description |
---|---|---|
string | propertyName | Name of the property used to notify listeners. This value is optional and can be provided automatically when invoked from compilers that support CallerMemberNameAttribute. |
RequiresUpdate<T>(ref T, T)
Checks if the property already matches the desired value or needs to be updated.
Declaration
protected bool RequiresUpdate<T>(ref T storage, T value)
Parameters
Type | Name | Description |
---|---|---|
T | storage | Reference to the backing-filed. |
T | value | Value to apply. |
Returns
Type | Description |
---|---|
bool |
|
Type Parameters
Name | Description |
---|---|
T | Type of the property. |
SetProperty<T>(ref T, T, string?)
Checks if the property already matches the desired value and updates it if not.
Declaration
protected bool SetProperty<T>(ref T storage, T value, string? propertyName = null)
Parameters
Type | Name | Description |
---|---|---|
T | storage | Reference to the backing-filed. |
T | value | Value to apply. |
string | propertyName | Name of the property used to notify listeners. This value is optional and can be provided automatically when invoked from compilers that support CallerMemberNameAttribute. |
Returns
Type | Description |
---|---|
bool |
|
Type Parameters
Name | Description |
---|---|
T | Type of the property. |
Events
| Edit this page View SourcePropertyChanged
Occurs when a property value changes.
Declaration
public event PropertyChangedEventHandler? PropertyChanged
Event Type
Type | Description |
---|---|
PropertyChangedEventHandler |