none
Disable selection in Listbox

Answers

All replies

  • James,

    by setting IsEnabled to False.

    Patrick

    Sunday, March 04, 2012 1:15 AM
  • if i set isenabled to false then it wont scroll.

    Sunday, March 04, 2012 1:45 AM
  • James,

    so you want to display items in a ListBox, want scrolling, but don't want selection?

    I think you should use a ScrollViewer, not a ListBox.

    Patrick

    Sunday, March 04, 2012 2:10 AM
  • Use an ItemsControl

    Sunday, March 04, 2012 2:31 AM
  • Although the code behind does not give any solution for this. What I have found out you can use client side logic to disable all items in the listbox. 

    You just have to set the disabled property to true for each item that gets drawn as <option> </option>.

    This way only the items will be disabled and the scroll bar will not.

    Asad


    Wednesday, February 08, 2017 3:38 AM