I'm applying the Windows7 theme to the standard listbox so that it's appearance blends in with the rest of my application, but I'm finding something super annoying. I can't get rid of the vertical scrollbar. I've tried setting the scrollviewer properties, but the don't make any difference. No matter how many items I have in my listbox, it shows the scrollbars. When I don't apply the theme, it only shows the scrollbar when the # of items is greater than the height of the box.
How do I get that auto visibility back?
How do I get that auto visibility back?
5 Answers, 1 is accepted
0
Hello Rayne,
Vanya Pavlova
the Telerik team
I have applied the Windows7 theme to the LIstBox control and the vertical scroll bar is showing as expected.
May you please check the attached project and let me know how it differs from yours?
Vanya Pavlova
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0

Rayne
Top achievements
Rank 1
answered on 31 May 2011, 02:06 PM
Even in the sample, I still see the scrollbars, they are just disabled. If I change the theme to Office_Black, they do as expected...I only get vertical scrollbars when there are more items in the list than the height of the box.
I can't see where to attach screenshots to show what I'm talking about.
I can't see where to attach screenshots to show what I'm talking about.
0

Rayne
Top achievements
Rank 1
answered on 31 May 2011, 02:11 PM
The expression dark theme does the same thing. The scrollbar is always there, no matter how many items there are in the list. Vista, the office themes and summer work the same way as an unstyled listbox.
0
Accepted
Hello Rayne,
All the best,
Vanya Pavlova
the Telerik team
In such case you may create an implict style targeted at ScrollViewer and directly set the theme from there and the visibility of the vertical scrollbars, as shown below:
<
Style
TargetType
=
"ScrollViewer"
>
<
Setter
Property
=
"telerik:StyleManager.Theme"
Value
=
"Windows7"
/>
<
Setter
Property
=
"ScrollViewer.VerticalScrollBarVisibility"
Value
=
"Auto"
/>
</
Style
>
</
Window.Resources
>
<
Grid
x:Name
=
"LayoutRoot"
DataContext
=
"{Binding Source={StaticResource SampleDataSource}}"
>
<
ListBox
Margin
=
"136,64,216,82"
telerik:StyleManager.Theme
=
"Windows7"
ItemsSource
=
"{Binding Collection}"
/>
</
Grid
>
Vanya Pavlova
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0

Rayne
Top achievements
Rank 1
answered on 01 Jun 2011, 01:23 PM
Thank you! That worked.