This is a migrated thread and some comments may be shown as answers.

VerticalAlignment=Stretch?

3 Answers 65 Views
DataBoundListBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ryan
Top achievements
Rank 1
Ryan asked on 13 Jun 2012, 04:23 AM
I'm trying to swap out a standard ItemsControl for a RadDataBoundListBox, but am finding that it does not stretch vertically. Instead, it looks like it has a fixed height of about 100 pixels. I can manually set the Height to make it taller, but I'd like it to stretch to fill the available space like a standard ItemsControl. How can I do this?

Thanks!
Ryan

3 Answers, 1 is accepted

Sort by
0
Ryan
Top achievements
Rank 1
answered on 14 Jun 2012, 03:13 AM
Oops nevermind. Since I was previously using an ItemsControl, I had it in a ScrollViewer. When I swapped it out for a RadDataBoundListBox, I ended up with a nested ScrollViewer. Removing the outer ScrollViewer solved the problem. 
0
janiss
Top achievements
Rank 1
answered on 08 Jan 2013, 04:40 PM
This is exactly my problem with RadDataBoundListBox :/

Im trying to put RadDataBoundListBox with disabled vertical scrolling in ScrollViewer, but it does not stretch, even if i set VerticalContentAlignment="Stretch". With default ListBox everything seems to work fine.
0
Deyan
Telerik team
answered on 09 Jan 2013, 07:36 AM
Hello Janis,

Thanks for writing.

When you put a DataBoundListBox instance in a ScrollViewer stretching is not a valid term since the ScrollViewer allows its direct child to grow as much as it wants. In other words, the DataBoundListBox will calculate its height based on the amount of items it has in its source.

I hope this helps.

Greetings,
Deyan
the Telerik team
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Tags
DataBoundListBox
Asked by
Ryan
Top achievements
Rank 1
Answers by
Ryan
Top achievements
Rank 1
janiss
Top achievements
Rank 1
Deyan
Telerik team
Share this question
or