Class BindingSession<TViewModel>

    Definition

    Namespace:
    Tizen.NUI.Binding
    Assembly:
    Tizen.NUI.dll

    BindingSession class provides a mechanism for binding properties of a view model to a view.

    public class BindingSession<TViewModel> : INotifyPropertyChanged, IDisposable
    Inheritance
    object
    BindingSession<TViewModel>
    Implements
    IDisposable

    Properties

    View Source

    ViewModel

    Gets or sets the view model.

    Declaration
    public TViewModel ViewModel { get; set; }
    Property Value
    Type Description
    TViewModel

    Methods

    View Source

    AddBinding(Action<TViewModel>, string)

    Adds a binding between a property of the view model and a property of the view.

    Declaration
    public void AddBinding(Action<TViewModel> setter, string path)
    Parameters
    Type Name Description
    Action<><TViewModel> setter

    The setter method of the view.

    string path

    The path of the property to bind.

    View Source

    AddTwoWayBinding<T>(Action<Action>, Action<Action>, Action<TViewModel>, Func<T>, string)

    Adds a two-way binding between a property of the view model and a property of the view.

    Declaration
    public void AddTwoWayBinding<T>(Action<Action> register, Action<Action> unregister, Action<TViewModel> setter, Func<T> getter, string path)
    Parameters
    Type Name Description
    Action<><Action> register

    The registration method of the observer.

    Action<><Action> unregister

    The unregistration method of the observer.

    Action<><TViewModel> setter

    The setter method of the view.

    Func<><T> getter

    The getter method of the view.

    string path

    The path of the property to bind.

    Type Parameters
    Name Description
    T

    The type of the property to bind.

    View Source

    ClearBinding()

    Clears all bindings.

    Declaration
    public void ClearBinding()
    View Source

    Dispose()

    Releases all resources used by the current instance of the BindingSession class.

    Declaration
    public void Dispose()
    View Source

    Dispose(bool)

    Provides a mechanism for releasing unmanaged resources used by the BindingSession class.

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing

    True if the method is called from Dispose, false if it is called from the finalizer.

    View Source

    GetValue(string)

    Gets the value of a property of the view model.

    Declaration
    public object GetValue(string name)
    Parameters
    Type Name Description
    string name

    The name of the property.

    Returns
    Type Description
    object

    The value of the property.

    View Source

    SetValue(object, string)

    Sets the value of a property of the view model.

    Declaration
    public void SetValue(object obj, string name)
    Parameters
    Type Name Description
    object obj

    The value to set.

    string name

    The name of the property.

    View Source

    UpdateViewModel()

    Updates the view model.

    Declaration
    public void UpdateViewModel()
    View Source

    UpdateViewModel(TViewModel)

    Updates the view model.

    Declaration
    public void UpdateViewModel(TViewModel vm)
    Parameters
    Type Name Description
    TViewModel vm

    The view model to update.

    Events

    View Source

    PropertyChanged

    Represents an event that is raised when a property value changes.

    Declaration
    public event PropertyChangedEventHandler PropertyChanged
    Event Type
    Type Description
    PropertyChangedEventHandler

    Implements

    IDisposable

    Extension Methods

    EXamlExtensions.LoadFromEXamlByRelativePath<T>(T, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, Type)
    Extensions.LoadFromXamlFile<TXaml>(TXaml, string)
    • View Source
    Back to top Copyright © 2016-2025 Samsung
    Generated by DocFX