WinJS.Binding

WinJS.Binding Namespace

Provides functionality for data and template binding.

In this section

TopicDescription

dynamicObservableMixin object

Allows you to add dynamic methods.

List object

Creates a WinJS.Binding.List object.

mixin object

Provides a standard implementation of the bindable contract, as well as a basic storage mechanism that participates in change notification and an asynchronous notification implementation.

observableMixin object

Provides functions that can make an object observable.

Template object

Provides a reusable declarative binding element.

addProperty method

Adds a property with change notification to this object, including a ECMAScript5 property definition.

as function

Returns an observable object. This may be an observable proxy for the specified object, an existing proxy, or the specified object itself if it directly supports observation.

bind function

Links the specified action to the property specified in the name parameter. This function is invoked when the value of the property may have changed. It is not guaranteed that the action will be called only when a value has actually changed, nor is it guaranteed that the action will be called for every value change. The implementation of this function coalesces change notifications, such that multiple updates to a property value may result in only a single call to the specified action.

converter function

Creates a default binding initializer for binding between a source property and a destination property with a provided converter function that is executed on the value of the source property.

declarativeBind method

Binds values from the specified data context to elements that are descendants of the specified root element and have declarative binding attributes (data-win-bind and data-win-bindsource).

defaultBind function

Creates a one-way binding between the source object and the destination object.

define function

Creates a new constructor function that supports observability with the specified set of properties.

expandProperties function

Wraps the specified object so that all its properties are instrumented for binding. This is meant to be used in conjunction with the binding mixin.

getProperty method

Gets a property value by name.

notify method

Notifies listeners that a property value was updated.

oneTime function

Sets the destination property to the value of the source property.

processAll function

Binds values from the dataContext parameter to elements which are descendants of the rootElement parameter that have the declarative binding attributes specified (data-win-bind and data-win-bindsource).

removeProperty method

Removes a property value.

setProperty method

Updates a property value and notifies any listeners.

unbind method

Removes one or more listeners from the notification list for a given property.

unwrap function

Returns the original (non-observable) object is returned if the specified object is an observable proxy,

updateProperty method

Updates a property value and notifies any listeners.

 

 

 

Ajouts de la communauté

AJOUTER
Afficher:
© 2017 Microsoft