Compartir a través de


optimizeBindingReferences property

Determines whether or not binding should automatically set the ID of an element. This property should be set to true in apps that use Windows Library for JavaScript (WinJS) binding.

Syntax

 WinJS.Binding.optimizeBindingReferences = true;

Property value

Type: Boolean

Set this property to true to avoid setting the ID of an element automatically.

Remarks

This property should be set in the setup procedure of an app that uses WinJS binding. It is set in all Visual Studio project templates. You can find more examples of this usage in Quickstart: binding data and styles and How to use templates to bind data.

The code below shows how to add it to the beginning of the default.js file in a Visual Studio project for Windows apps using JavaScript

Requirements

Minimum WinJS version

WinJS 1.0

Namespace

WinJS.Binding