Non-focusable item in a ListView RRS feed

  • Question

  • Hi,

    I'm building a Windows 8 app that uses a ListView controls. Our design require the bottom left item to be a watermark, so it's shouldn't be focusable but should be a part of the list so it can scroll with the other elements (and reflect the same animations etc).

    However I can't find a way to make the item non-focusable, in other controls I've achieved this by using such attributes as disabled but these don't seem to be picked up on ListView items.

    Is there any way to have a list view item non-focusable like this?


    S. Pigeon

    Thursday, October 3, 2013 2:26 PM

All replies

  • You can use an alternate template for the items that you don't want to be selectable and choose between the templates with a DataTemplateSelector.

    The How to disable specified items selection in Listview/Gridview  sample in the All-in-one Code Framework demonstrates this.


    Thursday, October 3, 2013 3:21 PM
  • Hi Rob,

    This sounds promising, however the example given is a C# example.

    Is this possible in a HTML5/JavaScript application too? What would I set as the template to force the item to be disabled?



    Thursday, October 3, 2013 3:26 PM
  • Sorry about that. I was using a grouped forum view and didn't notice the language. I'm not sure how you'd do this in HTML/JavaScript. I'll have to defer to somebody more familiar with that environment.


    Thursday, October 3, 2013 3:44 PM