locked
Is WinJS.Binding.List count property bindable?

    Question

  • I would like to display the number of items in the list using binding. Is that possible?
    Sunday, March 23, 2014 2:35 AM

Answers

  • Hi pkursawe,

    Use converter function of WinJS, the input of the binding can be a List Object and the output can be List.length as a integer.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, March 24, 2014 4:12 AM
    Moderator

All replies

  • Hi pkursawe,

    Use converter function of WinJS, the input of the binding can be a List Object and the output can be List.length as a integer.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, March 24, 2014 4:12 AM
    Moderator
  • To display the length of a binding list in a HubSection header I have to come up with a clever solution. As one can only set section.header to a string but this string would have to be composed of a title and "(count)".

    Wednesday, April 9, 2014 3:26 PM