Data source binding source. More...
#include <kanzi/core.ui/binding/data_source_binding_source.hpp>
Public Member Functions | |
string | getPath () const |
Gets the source data object path. More... | |
Public Member Functions inherited from kanzi::BindingSource | |
BindingSourceRuntimePtr | createRuntime () |
Creates binding source runtime. More... | |
virtual | ~BindingSource () |
Destructor. More... | |
Static Public Member Functions | |
static BindingSourcePtr | create (string_view path) |
Creates a new data source binding source. More... | |
Protected Member Functions | |
BindingSourceRuntimePtr | createRuntimeOverride () override |
BindingSource::createRuntime implementation. More... | |
DataSourceBindingSource (string_view path) | |
Constructor. More... | |
Protected Member Functions inherited from kanzi::BindingSource | |
BindingSource () | |
Constructor. More... | |
Protected Attributes | |
string | m_path |
Path to object to listen to. More... | |
Data source binding source.
DataSourceBindingSource specifies a path to a data source in the local effective data source context. When the value specified by the path changes, it is used as the source value for the binding. If the data object specified by the path is not available, DataSourceBindingSource waits for the object to be available and connects when it exists for the local data source context.
To create a data source binding source:
To write to a data source, you can create a two-way binding to a data source.
Data source binding sources can connect and read values only if a data source is available for the location in which they are used. For nodes this means that the DataContext::DataContextProperty is set in the node or in an ascendant of the node.
You can create a data source binding by binding to the DataContext::DataContextProperty of a Node. In this case, a DataObject within the DataContext can serve as the data source for the Node and its descendants. To create a data context binding:
|
inlineprotected |
Constructor.
path | Data object path. |
|
static |
Creates a new data source binding source.
path | Data object path. |
|
inline |
Gets the source data object path.
|
overrideprotectedvirtual |
BindingSource::createRuntime implementation.
Implements kanzi::BindingSource.
|
protected |
Path to object to listen to.