optimizeBindingReferences property

Applies to Windows and Windows Phone

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 Store apps using JavaScript

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1

Namespace

WinJS.Binding

Library

Base.js

 

 

Show:
© 2014 Microsoft