Class BindableObject
Definition
- Assembly:
- Tizen.NUI.dll
Provides a mechanism by which application developers can propagate changes that are made to data in one object to another.
public abstract class BindableObject : INotifyPropertyChanged, IDynamicResourceHandler
- Inheritance
-
objectBindableObject
- Derived
- Implements
Fields
View SourceBindingContextProperty
Implements the bound property whose interface is provided by the BindingContext property.
Declaration
public static readonly BindableProperty BindingContextProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty |
Properties
View SourceBindingContext
Gets or sets object that contains the properties that will be targeted by the bound properties that belong to this BindableObject.
Declaration
public object BindingContext { get; set; }
Property Value
| Type | Description |
|---|---|
| object |
IsBound
Check if object is bound or not.
Declaration
public bool IsBound { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
IsCreateByXaml
Declaration
public virtual bool IsCreateByXaml { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
LineNumber
Declaration
public int LineNumber { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
LinePosition
Declaration
public int LinePosition { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
View SourceApplyBindings()
Apply the bindings to BindingContext.
Declaration
protected void ApplyBindings()
ClearBinding()
Unapplies all previously set bindings.
Declaration
public void ClearBinding()
CopyBindingRelationShip(BindableObject)
Copy all binding from other object.
Declaration
public void CopyBindingRelationShip(BindableObject other)
Parameters
| Type | Name | Description |
|---|---|---|
| BindableObject | other |
CopyFrom(BindableObject)
Copy properties of other ViewStyle to this.
Declaration
public virtual void CopyFrom(BindableObject other)
Parameters
| Type | Name | Description |
|---|---|---|
| BindableObject | other | The other BindableProperty merge to this. |
EnforceNotifyBindedInstance(BindableProperty)
Declaration
public void EnforceNotifyBindedInstance(BindableProperty property)
Parameters
| Type | Name | Description |
|---|---|---|
| BindableProperty | property |
GetValue(BindableProperty)
Returns the value that is contained the BindableProperty.
Declaration
public object GetValue(BindableProperty property)
Parameters
| Type | Name | Description |
|---|---|---|
| BindableProperty | property | The BindableProperty for which to get the value. |
Returns
| Type | Description |
|---|---|
| object | The value that is contained the BindableProperty |
OnBindingContextChanged()
Override this method to execute an action when the BindingContext changes.
Declaration
protected virtual void OnBindingContextChanged()
OnPropertyChanged(string)
Call this method from a child class to notify that a change happened on a property.
Declaration
protected virtual void OnPropertyChanged(string propertyName = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | propertyName | The name of the property that changed. |
OnPropertyChangedWithData(BindableProperty)
Method that is called when a bound property is changed.
Declaration
protected virtual void OnPropertyChangedWithData(BindableProperty prop)
Parameters
| Type | Name | Description |
|---|---|---|
| BindableProperty | prop |
OnPropertyChanging(string)
Call this method from a child class to notify that a change is going to happen on a property.
Declaration
protected virtual void OnPropertyChanging(string propertyName = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | propertyName | The name of the property that is changing. |
RegisterPropertyGroup(BindableProperty, HashSet<BindableProperty>)
Register the properties which can effect each other in Binding to same group.
Declaration
public static void RegisterPropertyGroup(BindableProperty property, HashSet<BindableProperty> group)
Parameters
| Type | Name | Description |
|---|---|---|
| BindableProperty | property | |
| HashSet<><BindableProperty> | group |
RemoveBinding(BindableProperty)
Removes a previously set binding.
Declaration
public void RemoveBinding(BindableProperty property)
Parameters
| Type | Name | Description |
|---|---|---|
| BindableProperty | property | The BindableProperty from which to remove bindings. |
SetBinding(BindableProperty, BindingBase)
Assigns a binding to a property.
Declaration
public void SetBinding(BindableProperty targetProperty, BindingBase binding)
Parameters
| Type | Name | Description |
|---|---|---|
| BindableProperty | targetProperty | The BindableProperty on which to set a binding. |
| BindingBase | binding | The binding to set. |
SetInheritedBindingContext(BindableObject, object)
Set the inherited context to a neated element.
Declaration
public static void SetInheritedBindingContext(BindableObject bindable, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| BindableObject | bindable | The object on which to set the inherited binding context. |
| object | value | The inherited context to set. |
SetValue(BindableProperty, object)
Sets the value of the specified property.
Declaration
public void SetValue(BindableProperty property, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| BindableProperty | property | The BindableProperty on which to assign a value. |
| object | value | The value to set. |
SetValue(BindablePropertyKey, object)
Sets the value of the propertyKey.
Declaration
public void SetValue(BindablePropertyKey propertyKey, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| BindablePropertyKey | propertyKey | The BindablePropertyKey on which to assign a value. |
| object | value | The value to set. |
UnapplyBindings()
Unapplies all previously set bindings.
Declaration
protected void UnapplyBindings()
Events
View SourceBindingContextChanged
Raised whenever the BindingContext property changes.
Declaration
public event EventHandler BindingContextChanged
Event Type
| Type | Description |
|---|---|
| EventHandler |
PropertyChanged
Raised when a property has changed.
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
| Type | Description |
|---|---|
| PropertyChangedEventHandler |
PropertyChanging
Raised when a property is about to change.
Declaration
public event PropertyChangingEventHandler PropertyChanging
Event Type
| Type | Description |
|---|---|
| PropertyChangingEventHandler |
Explicit Interface Implementations
View SourceIDynamicResourceHandler.SetDynamicResource(BindableProperty, string)
Declaration
void IDynamicResourceHandler.SetDynamicResource(BindableProperty property, string key)
Parameters
| Type | Name | Description |
|---|---|---|
| BindableProperty | property | |
| string | key |