c# 4.0 - Listbox is disabled and vertical scrollbar goes way with silverlight -
c# 4.0 - Listbox is disabled and vertical scrollbar goes way with silverlight -
i have this
<listbox itemssource="{binding students}" selectionmode="extended" name="liststudents" height="430" isenabled="{binding canupdatenumber}"> </listbox>
when isenabled true , items in listbox more vertical scrollbar present. when isenabled false items disabeld (which true) , scrollbar off cant see items in listbox.
how create scrollbar nowadays when isenabled false
try wrapping listbox scrollviewer control, this:
<scrollviewer verticalscrollbarvisibility="auto" height="430" width="110" padding="0"> <listbox itemssource="{binding students}" selectionmode="extended" name="liststudents" isenabled="{binding canupdatenumber}" scrollviewer.verticalscrollbarvisibility="hidden" borderthickness="0"> </listbox> </scrollviewer>
found here: http://manny-grewal.blogspot.be/2010/09/enable-scroll-in-disabled-listbox-in.html
edit:
i think spotted error made in post. set height in scrollviewer , remove height listbox.
silverlight c#-4.0 silverlight-4.0 listbox scrollbar
Comments
Post a Comment