Reputation: 1529
I am using silverlight and my combobox is like this:
ComboBox cb = new ComboBox();
Suppose it already contains Items which are visible only on clicking the combobox.
I want add a vertical scrollbar(or slider) programatically when it shows its items. Is there any inbuilt property for this in silverlight or do I need to use scrollbar or slider for it?
Upvotes: 0
Views: 15086
Reputation: 953
You can try changing the dropdownheight property.
cb.DropDownHeight = cb.ItemHeight * 5;
This is to view only 5 items at a time
Upvotes: 2
Reputation: 48568
There is an inbuilt property of ScrollViewer.VerticalScrollbarVisibility
. Set its value to Visible
.
For more read this
Upvotes: 2