Class BindableProperty
Definition
- Assembly:
- Tizen.NUI.dll
A BindableProperty is a backing store for properties allowing bindings on BindableObject.
public sealed class BindableProperty
- Inheritance
-
objectBindableProperty
Properties
View SourceDeclaringType
Gets the type declaring the BindableProperty.
Declaration
public Type DeclaringType { get; }
Property Value
Type | Description |
---|---|
Type |
DefaultBindingMode
Gets the default BindingMode.
Declaration
public BindingMode DefaultBindingMode { get; }
Property Value
Type | Description |
---|---|
BindingMode |
DefaultValue
Gets the default value for the BindableProperty.
Declaration
public object DefaultValue { get; }
Property Value
Type | Description |
---|---|
object |
IsReadOnly
Gets a value indicating if the BindableProperty is created form a BindablePropertyKey.
Declaration
public bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
bool |
PropertyName
Gets the property name.
Declaration
public string PropertyName { get; }
Property Value
Type | Description |
---|---|
string |
ReturnType
Gets the type of the BindableProperty.
Declaration
public Type ReturnType { get; }
Property Value
Type | Description |
---|---|
Type |
Methods
View SourceCreate(string, Type, Type, object, BindingMode, ValidateValueDelegate, BindingPropertyChangedDelegate, BindingPropertyChangingDelegate, CoerceValueDelegate, CreateDefaultValueDelegate)
Creates a new instance of the BindableProperty class.
Declaration
public static BindableProperty Create(string propertyName, Type returnType, Type declaringType, object defaultValue = null, BindingMode defaultBindingMode = BindingMode.OneWay, BindableProperty.ValidateValueDelegate validateValue = null, BindableProperty.BindingPropertyChangedDelegate propertyChanged = null, BindableProperty.BindingPropertyChangingDelegate propertyChanging = null, BindableProperty.CoerceValueDelegate coerceValue = null, BindableProperty.CreateDefaultValueDelegate defaultValueCreator = null)
Parameters
Type | Name | Description |
---|---|---|
string | propertyName | The name of the BindableProperty. |
Type | returnType | The type of the property. |
Type | declaringType | The type of the declaring object. |
object | defaultValue | The default value for the property. |
BindingMode | defaultBindingMode | The BindingMode to use on SetBinding() if no BindingMode is given. This parameter is optional. Default is BindingMode.OneWay. |
BindableProperty.ValidateValueDelegate | validateValue | A delegate to be run when a value is set. This parameter is optional. Default is null. |
BindableProperty.BindingPropertyChangedDelegate | propertyChanged | A delegate to be run when the value has changed. This parameter is optional. Default is null. |
BindableProperty.BindingPropertyChangingDelegate | propertyChanging | A delegate to be run when the value will change. This parameter is optional. Default is null. |
BindableProperty.CoerceValueDelegate | coerceValue | A delegate used to coerce the range of a value. This parameter is optional. Default is null. |
BindableProperty.CreateDefaultValueDelegate | defaultValueCreator | A Func used to initialize default value for reference types. |
Returns
Type | Description |
---|---|
BindableProperty | A newly created BindableProperty. |
CreateAttached(string, Type, Type, object, BindingMode, ValidateValueDelegate, BindingPropertyChangedDelegate, BindingPropertyChangingDelegate, CoerceValueDelegate, CreateDefaultValueDelegate)
Creates a new instance of the BindableProperty class for an attached property.
Declaration
public static BindableProperty CreateAttached(string propertyName, Type returnType, Type declaringType, object defaultValue, BindingMode defaultBindingMode = BindingMode.OneWay, BindableProperty.ValidateValueDelegate validateValue = null, BindableProperty.BindingPropertyChangedDelegate propertyChanged = null, BindableProperty.BindingPropertyChangingDelegate propertyChanging = null, BindableProperty.CoerceValueDelegate coerceValue = null, BindableProperty.CreateDefaultValueDelegate defaultValueCreator = null)
Parameters
Type | Name | Description |
---|---|---|
string | propertyName | The name of the BindableProperty. |
Type | returnType | The type of the property. |
Type | declaringType | The type of the declaring object. |
object | defaultValue | The default value for the property. |
BindingMode | defaultBindingMode | The BindingMode to use on SetBinding() if no BindingMode is given. This parameter is optional. Default is BindingMode.OneWay. |
BindableProperty.ValidateValueDelegate | validateValue | A delegate to be run when a value is set. This parameter is optional. Default is null. |
BindableProperty.BindingPropertyChangedDelegate | propertyChanged | A delegate to be run when the value has changed. This parameter is optional. Default is null. |
BindableProperty.BindingPropertyChangingDelegate | propertyChanging | A delegate to be run when the value will change. This parameter is optional. Default is null. |
BindableProperty.CoerceValueDelegate | coerceValue | A delegate used to coerce the range of a value. This parameter is optional. Default is null. |
BindableProperty.CreateDefaultValueDelegate | defaultValueCreator | A Func used to initialize default value for reference types. |
Returns
Type | Description |
---|---|
BindableProperty | A newly created BindableProperty. |
CreateAttachedReadOnly(string, Type, Type, object, BindingMode, ValidateValueDelegate, BindingPropertyChangedDelegate, BindingPropertyChangingDelegate, CoerceValueDelegate, CreateDefaultValueDelegate)
Creates a new instance of the BindableProperty class for attached read-only properties.
Declaration
public static BindablePropertyKey CreateAttachedReadOnly(string propertyName, Type returnType, Type declaringType, object defaultValue, BindingMode defaultBindingMode = BindingMode.OneWayToSource, BindableProperty.ValidateValueDelegate validateValue = null, BindableProperty.BindingPropertyChangedDelegate propertyChanged = null, BindableProperty.BindingPropertyChangingDelegate propertyChanging = null, BindableProperty.CoerceValueDelegate coerceValue = null, BindableProperty.CreateDefaultValueDelegate defaultValueCreator = null)
Parameters
Type | Name | Description |
---|---|---|
string | propertyName | The name of the BindableProperty. |
Type | returnType | The type of the property. |
Type | declaringType | The type of the declaring object. |
object | defaultValue | The default value for the property. |
BindingMode | defaultBindingMode | The BindingMode to use on SetBinding() if no BindingMode is given. This parameter is optional. Default is BindingMode.OneWay. |
BindableProperty.ValidateValueDelegate | validateValue | A delegate to be run when a value is set. This parameter is optional. Default is null. |
BindableProperty.BindingPropertyChangedDelegate | propertyChanged | A delegate to be run when the value has changed. This parameter is optional. Default is null. |
BindableProperty.BindingPropertyChangingDelegate | propertyChanging | A delegate to be run when the value will change. This parameter is optional. Default is null. |
BindableProperty.CoerceValueDelegate | coerceValue | A delegate used to coerce the range of a value. This parameter is optional. Default is null. |
BindableProperty.CreateDefaultValueDelegate | defaultValueCreator | A Func used to initialize default value for reference types. |
Returns
Type | Description |
---|---|
BindablePropertyKey | A newly created attached read-only BindablePropertyKey. |
CreateReadOnly(string, Type, Type, object, BindingMode, ValidateValueDelegate, BindingPropertyChangedDelegate, BindingPropertyChangingDelegate, CoerceValueDelegate, CreateDefaultValueDelegate)
Creates a new instance of the BindablePropertyKey class.
Declaration
public static BindablePropertyKey CreateReadOnly(string propertyName, Type returnType, Type declaringType, object defaultValue, BindingMode defaultBindingMode = BindingMode.OneWayToSource, BindableProperty.ValidateValueDelegate validateValue = null, BindableProperty.BindingPropertyChangedDelegate propertyChanged = null, BindableProperty.BindingPropertyChangingDelegate propertyChanging = null, BindableProperty.CoerceValueDelegate coerceValue = null, BindableProperty.CreateDefaultValueDelegate defaultValueCreator = null)
Parameters
Type | Name | Description |
---|---|---|
string | propertyName | The name of the BindableProperty. |
Type | returnType | The type of the property. |
Type | declaringType | The type of the declaring object. |
object | defaultValue | The default value for the property. |
BindingMode | defaultBindingMode | The BindingMode to use on SetBinding() if no BindingMode is given. This parameter is optional. Default is BindingMode.OneWay. |
BindableProperty.ValidateValueDelegate | validateValue | A delegate to be run when a value is set. This parameter is optional. Default is null. |
BindableProperty.BindingPropertyChangedDelegate | propertyChanged | A delegate to be run when the value has changed. This parameter is optional. Default is null. |
BindableProperty.BindingPropertyChangingDelegate | propertyChanging | A delegate to be run when the value will change. This parameter is optional. Default is null. |
BindableProperty.CoerceValueDelegate | coerceValue | A delegate used to coerce the range of a value. This parameter is optional. Default is null. |
BindableProperty.CreateDefaultValueDelegate | defaultValueCreator | A Func used to initialize default value for reference types. |
Returns
Type | Description |
---|---|
BindablePropertyKey | A newly created BindablePropertyKey. |